0 pts.
 creating multiple rollovers
Hi, i was wondering if somebody can help me please. I have a rollover button and when it is rollover it changes state - the thing is i want it to change a picture to change states as well - when the button is rollover. Sorry its a little vague. Appreciate any help thanks andy

Software/Hardware used:
ASKED: March 1, 2005  8:35 AM
UPDATED: March 1, 2005  9:32 AM

Answer Wiki:
If Inderstand you correctly, you have a button that changes when you rollover it. And you would like the same rollover event to cause a picture to change as well. If you're using Javascript you would want something like this: if (document.images) { var buttonOn = new Image(); // for the Rollover button buttonOn.src = "buttonOn .gif"; var buttonOff = new Image(); // for the base button buttonOff.src = "buttonOff .gif"; var ImageOn = new Image(); // for the Rollover button ImageOn.src = "ImageOn .gif"; var ImageOff = new Image(); // for the base button ImageOff.src = "ImageOff .gif"; } function RollOn{ if (document.images) { document.images.button1.src = buttonOn.src; document.images.Image1.src = ImageOn.src; } } function RollOff{ if (document.images) { // change the button document.images.button1.src = buttonOff.src; // change the other picture ** Make sure your names match document.images.Image1.src = ImageOff.src; } } You simply add the HTML with the event in the button's tag <!--Button tag--> <IMG NAME="Button1" SRC="buttonOff.gif" onMouseOver="RollOn()" onMouseOut="RollOff()"> <!--Image tag--> <IMG NAME="Image1" SRC="ImageOff.gif"> That is, of course, if I understood your question. Cheers
Last Wiki Answer Submitted:  March 1, 2005  9:32 am  by  Couz88   0 pts.
All Answer Wiki Contributors:  Couz88   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _