php? Posted August 7, 2007 Share Posted August 7, 2007 href="?p=signup"onmouseover="image2.src='images/nav/2-on.gif';"onmouseout="image2.src='images/nav/2.gif';"> <img name="image2" src="images/nav/2.gif" border=0></a><br> Mkay, so this changes the image to 2-on on mouse over... and then on mouse out it changes back to image 2. What im wondering is how would i make it do: on mouse over (more then 1 image) changes a different image on the page to another image, and then on mouse out of the other images changes the other image back. (If not image then table?) Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 7, 2007 Share Posted August 7, 2007 this should be done with css.... but as you want like a slide show of images you would need to pass a list of images to a function for that to change the image. onmouseover="imgswitcher('img1','img2',....'imgn') // imgn should be the path to each image. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 7, 2007 Share Posted August 7, 2007 Sorry you will need to use the arguments object of the function and be able to switch the setTimeOut() on/off Quote Link to comment Share on other sites More sharing options...
gurroa Posted August 9, 2007 Share Posted August 9, 2007 <img src="mouse.gif" onmouseover="document.getElementById('ImageToChange').src='images/nav/2-on.gif';" onmouseout="document.getElementById('ImageToChange').src='images/nav/2.gif';" ><br /> ... <img src="images/nav/2.gif" id="ImageToChange"> Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 9, 2007 Share Posted August 9, 2007 Sorry didn't read OP properly gurroa's method would work IF you add the swap of the current image too... Quote Link to comment Share on other sites More sharing options...
mainewoods Posted August 9, 2007 Share Posted August 9, 2007 <a href="??" onmouseover="document.getElementById('ImageToChange').src='images/nav/2-on.gif';" onmouseout="document.getElementById('ImageToChange').src='images/nav/2.gif';" ><img src="images/nav/2.gif" id="ImageToChange"></a> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.