Forum Moderators: open
Here is the DOCTYPE I am using:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Here is the code where I am using onload:
<img src="images/japan_map.jpg" alt="map of Japan and Air Frame locations" width="145" height="175" onload="MM_swapImage('nav_home','','images/nav_home_f3.jpg',1)" />
Thanks
Make the body tag have an onLoad that runs a JavaScript function that checks the .src of a given image name.
So if you have <img src=blah.jpg name=joe>
then proceed to do an if/then to determine which images are swapped.
Like. . . trigger the below script with onLoad in your body tag.
if(document.joe.src == 'blah.jpg'){
document.window.otherimage.src='swapimage.jpg'
}