I need a resource that has an easy to use mouseover script, that works with more than 1 mouseover per page
| SitePoint Sponsor |





I am guessing that you want to be able to rollover one image and have 2 or more images change. Is that what you mean? If so then take a look at this page:
http://www.kbxl-kspd.com/index.shtml
Then use this script: This part goes inside the HEAD tag.
<script language="javascript">
<!--
if (document.images) {
image1on = new Image();
image1on.src = "about_us_on.gif";
image1off = new Image();
image1off.src = "about_us_off.gif";
listen_to_us_on = new Image();
listen_to_us_on.src = "listen_to_us_on.gif";
listen_to_us_off = new Image();
listen_to_us_off.src = "listen_to_us_off.gif";
contact_us_on = new Image();
contact_us_on.src = "contact_us_on.gif";
contact_us_off = new Image();
contact_us_off.src = "contact_us_off.gif";
}
function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
}
}
}
// -->
</script>
This part goes in the body tag:
<a href="about_us.shtml" onmouseover="changeImages('image1', 'image1on'); changeImages('listen_to_us', 'listen_to_us_on')" onmouseout="changeImages('image1', 'image1off'); changeImages('listen_to_us', 'listen_to_us_off')"><img name="image1" src="about_us_off.gif" alt="About Us" width="133" height="18" border="0"></a>
Note that I am simply calling the "changeimages" twice in each "onMouseOver" event. There might be an easier way to do this, but this method will work.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
I guess I should have been more clear.
Check my site www.sparq-l.com you'll see the buttons I have. I want a different script than the one I currently use because IE shows it as having an error on the page.





That;s fine. You are still more than welcome to use the code that I posted. Simply remove ONE of the Changeimages function calls in each section of the HREF tag.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
Bookmarks