Hey there, so this is my first time posting here, hoping for some help. I'll get straight to it. I am trying to have a single image trigger the swapImgRestore() for two different images. I have the MM_swapImage for the two different images and that works perfectly fine. The problem is the swapImgRestore only restores the previously coded MM_swapImage. What I have so far looks like this: <img src="images/square.png" alt="" name="motion3" width="19" height="19" border="0" id="motion3" onMouseOver="MM_swapImage('motionbox','','images/Test1.jpg',1);MM_swapImage('motion3','','images/white.png',1)" onMouseOut="MM_swapImgRestore()"/> Code (markup): I do have the functions defined within the <head> tag. I tried modifying the MM_swapImgRestore but have had no luck in getting it to work, which came out looking like this . . . <img src="images/square.png" alt="" name="motion3" width="19" height="19" border="0" id="motion3" onMouseOver="MM_swapImage('motionbox','','images/Test1.jpg',1);MM_swapImage('motion3','','images/white.png',1)" onMouseOut="MM_swapImgRestore();MM_swapImgRestore('images/Test1.jpg','','images/white.png',1)"/> Code (markup): If anyone has messed with this command before, I'd greatly appreciate any assistance. Thanks for your time.
OK. I didn't exactly solve my problem, but I found a workaround that seems to work. If anyone else has a similar problem, this may help. I added the swapImgRestore() script under the onMouseOut and and linking to the correct files. Thus . . . <img src="images/square.png" alt="" name="motion1" width="19" height="19" border="0" id="motion1" onClick="MM_openBrWindow('images/Test1.jpg','Test1','width=500,height=500')" onMouseOver="MM_swapImage('motionbox','','images/Test1.jpg',1);MM_swapImage('motion1','','images/white.png',1);MM_setTextOfLayer('name','','<b><font size="-1" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif" color="white">_ACTIVELIFE</font></b>');MM_setTextOfLayer('info','','<b><font size="-1" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif" color="white">\nClient: Nike<br>\nStudio: Nike Design Studio<br>\nOh, urban-motif design. How I love thee...\n</font></b>')" onMouseOut="MM_swapImgRestore();[B]MM_swapImage('motionbox','','images/white.png',1)[/B];MM_setTextOfLayer('name','','<b><font size="-1" face="Helvetica, Geneva, Arial, SunSans-Regular, sans-serif" color="white">_Name</font></b>');MM_setTextOfLayer('info','','')"/> Code (markup):
I had this problem and found this forum almost immediately. After digging further, as this site didn't have the solution, but only the work around, I discover it. You're calling on the function too many times. I was using Dreamweaver, and it automatically codes it this way. The solution is to condense the code thusly: <img src="images/square.png" alt="" name="motion3" width="19" height="19" border="0" id="motion3" onMouseOver="MM_swapImage('motionbox','','images/Test1.jpg','motion3','','images/white.png',1)" onMouseOut="MM_swapImgRestore()"/> Code (markup):