Thanks for taking the time to reply, unfortunately I cannot get your code to work. I noticed that you put a form path around my code, but I want it for images.
Here is the code in full - it is triggered on MouseOver. This works (but only for one button) but I want it to change 4 buttons sumultaneously - hence the loop :
onmouseover="for(var i = 0 ; i <= 4 ; i++){document.images.button1.src='images/n-butt1.gif'}"
I tried to adapt this with variations based on your code but it wouldn't work.
There's a possibility you'll run into quotation-mark-mayhem when doing this, however, so I would recommend changing the onmouseover action to a function call and put that whole for-statement inside the function.
Sorry for the delay in replying (been away for a for days). Thanks for the input, your solution worked great with just a little alteration to the quotation marks (as you predicted):
onmouseover="for(var i = 1 ; i <= 4 ; i++){document.images['button'+ i].src='images/n-butt'+i+'.gif'}"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.