How can "hover buttons" be done in webclient?

Forum to discuss the Web client version of Servoy.

How can "hover buttons" be done in webclient?

Postby Westy » Tue Mar 02, 2010 8:18 pm

Is it possible to have a "hover button" in webclient that swaps out two images when a mouse is placed over it, to show the button as "highlighted"?
If yes, sample code would be greatly appreciated.

Dean Westover
Choices Software, Inc.
Westy
 
Posts: 790
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: How can "hover buttons" be done in webclient?

Postby Roberto Blasco » Wed Mar 03, 2010 1:34 am

Hi Westy.

Try this example. Note that display type of 'html' variable is HTML_AREA.

Best regards. Roberto.
You do not have the required permissions to view the files attached to this post.
Un saludo. Roberto.

Madrid - Spain
Tfno: (+34) 625653066
E-mail: roberto.blasco.serrano@gmail.com
User avatar
Roberto Blasco
007
 
Posts: 301
Joined: Tue Apr 08, 2008 7:18 pm
Location: Madrid / Spain

Re: How can "hover buttons" be done in webclient?

Postby Westy » Wed Mar 03, 2010 6:18 am

Roberto,

Thank you for your example solution. It is perfect and you have made it easy to understand.

Very much appreciated!

Dean Westover
Choices Software, Inc.
Westy
 
Posts: 790
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: How can "hover buttons" be done in webclient?

Postby Gordon » Wed Mar 03, 2010 11:14 am

Hey Roberto - thanks for this, really appreciated
Gordon McLean
Click Digital Media Ltd
SAN Developer
www.clickdigital.com
User avatar
Gordon
 
Posts: 269
Joined: Thu Mar 17, 2005 8:05 pm
Location: UK

Re: How can "hover buttons" be done in webclient?

Postby Westy » Wed Mar 03, 2010 8:31 pm

The "hover buttons" are working great in Servoy 5.1, but not in 3.5. Is this approach possible in version 3.5?

If not, what is the earliest version of Servoy that supports this technique?

Dean Westover
Choices Software, Inc.
Westy
 
Posts: 790
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: How can "hover buttons" be done in webclient?

Postby Westy » Fri Dec 23, 2011 3:44 pm

We are on Servoy 6.x now and the hover buttons are working great. There is just one issue; the hover is applied to all buttons on the form. How can the code be changed to make the hover apply only to specific buttons on a form? Our existing code is similar to this:

Code: Select all
<html>
<head>
<style type='text/css'>.button {background: url(media:///ButtonDefaultColor.gif) no-repeat;
width: 113px; height: 27px;color: white; } .button:hover { background: url(media:///ButtonHoverColor.gif) no-repeat;
width: 113px; height: 27px; color: black;}
</style>
</head>
<body>
</body>
</html>

Dean
Westy
 
Posts: 790
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: How can "hover buttons" be done in webclient?

Postby ngervasi » Fri Dec 23, 2011 4:40 pm

If you use CSS styles to define the hover image you need to define multiple css styles and assign them to your button accordingly. In the worst scenario (where you want to set a different image per every button) you will have to define and apply one style per button.
It would be nice if the property "rollover-image" would work also in webclient.
ngervasi
 
Posts: 1470
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: How can "hover buttons" be done in webclient?

Postby Harjo » Sat Dec 24, 2011 12:07 pm

It would be nice if the property "rollover-image" would work also in webclient.


have you tried this in the latest 6 version??
This already works! :-)
Harjo Kompagnie
Direct ICT / Servoy Hosting / ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
User avatar
Harjo
 
Posts: 4067
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 1 guest