PDA

View Full Version : Help with javascript...



beka
02-17-2006, 11:30 AM
hello,
the below link will take you to a page i'm still working on...after the thumbnail is clicked and an image is viewed, the client would like the little square thumbnail to remain highlighted, or in the rollover state, so you know which images have been viewed when looking at other images....hope that makes sense....

www.mivillephoto.com/web_wed/wed2.html (http://www.mivillephoto.com/web_wed/wed2.html)

thank you so much!!
ASAP would be swell!

barbs770
02-17-2006, 05:50 PM
Hi beka, try changing...


buttns/but9.gif (#)

to


buttns/but9.gif (#)

Removing onMouseOut="MM_swapImgRestore()" from all your button links should keep the images in the rollover state.

barbs770
02-18-2006, 09:33 AM
After I thought about it, I remembered that you should also change "onMouseOver" to "onClick" so that it only changes when you click on it.

Hope this helps!

beka
02-18-2006, 10:18 AM
thanks for your help!
i keep trying and it's just not working...
After I thought about it, I remembered that you should also change "onMouseOver" to "onClick" so that it only changes when you click on it.

would i change it to "onMouseClick" or just "onClick"?
Just uploaded...only the first 4 buttons have the the new script..
still not working...:~(

barbs770
02-20-2006, 06:04 PM
onClick should work, but sometimes Javascript needs a little prompting to do what it's told...try adding "true" at the end:


onClick="MM_swapImage('Image4','','buttns/but1_over.gif',1);true;"

This should make the rollover effect stick. To get the rollover and the onClick to work together you may need to set a boolean variable. For example, when you call onClick set the variable to true. When you do a MouseOut check the variable, if it's true, exit the MouseOut function without doing anything. If the variable is false, continue with the MouseOut function.

I hope that wasn't too confusing. What you want to do is possible...it's just going to take a little more work. :)