Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Hover Buttons


Message #1 by webdesigners webdesigners <a2zwd@y...> on Thu, 7 Dec 2000 09:37:14 -0800 (PST)
The Frontpage extensions are serverside extensions, so a client visiting 
the website does not need to have these extensions installed.
I don't know what you use to have a hover button, but the following code is 
both easy and browser independent:

First, create a JavaScript function like this:

function swapImages(img, ref)
{
         document.images[img].src = ref;
}

Then use the following code to create the hover effect:

<A HREF="aPage.asp" onMouseOver="swapImages('edit', 
'/images/button1_on.gif');" onMouseOut="swapImages('edit', 
'/images/button1_off.gif'');">
<IMG name="edit" border=0 SRC="/images/button1_off.gif"></a>

There are lot's of other hover functions as well., so this is just a 
solution to the problem.
This code shows a normal IMG tag with the "off" button. This IMG tag is 
linked with an A HREF. In the OnMouseOver of the A HREF, swapImages is 
called. This function replaces the source of the image with the new one.
In the OnMouseOut the same happens. Only this time, the source of the image 
is the "On" image, so it will now be replaced by the "Off" image again.


HtH

Imar



At 06:10 PM 12/7/2000 -0800, you wrote:
>Hi,
>
>I am using hover buttons. I placed these buttons in
>frontpage2000. If i run the same page in other system
>these hover buttons are not activating. I came to know
>that if a system is having frontpage extensions then
>only these hover buttons will work. But it is not
>necessary that all the systems should have frontpage
>extensions. But i want to enable these buttons on all
>the systems. That is we dont know that the client
>accessing our application is having frontpage
>extensions. But all the clients has to click th hover
>buttons placed in my website. Pls help me in getting
>this.
>     Thanks in Advance.
>
>My Mailid : a2zwd@y...

  Return to Index