Click to See Complete Forum and Search --> : what javascript is being used?


j singh
10-08-2003, 12:58 AM
Hi,

Can someone tell me what javascript is being used for the photo-buttons on this site: http://www.silvereditions.co.uk/erol.html#1x0&&


When mouse goes over a photo-button the button ligtens up.

Can you please tell where I can get this jjava script.

Thanks

Jazz

lillu
10-08-2003, 01:48 AM
It's a simple image rollover. There are two images (one gray, one colored)

One of the ways to do it:

<img src="phone2.jpg" NAME="phone" onMouseOver="phone.src=phone1.jpg'"
onMouseOut="phone.src=phone2.jpg'" />

paps
10-08-2003, 01:50 AM
Singh my man....i donno what script they r using but the logic of doing so is pretty simple...simply use the event OnMouseOver when this event fires, call some Javascript/VBScript function to replace the image by another one....just as the site may be doing......
but with this logic there is a major fault...high network traffic of downloading the second image and so on.....

an alternative to this is using a simple GIF image which can do this mouseovers on itself...saving the network time of downloading the image everytime a mouseover event occurs....

HTH :D