
Originally Posted by
djr33
It's the same command as onMouseover for the links, but use "onLoad" in the body tag instead.
ie: <body ... onLoad="dothis()">
He means:
HTML Code:
<body onload="modifyimage('dynloadarea', 0)">
That's one way to do it but, in my opinion there is a much better way. Since the way this script works is to replace the innerHTML of the element (a division in the demo) with the id of 'dynloadarea', we can put anything in there we like, it will be overwritten once the script starts to work. You can put any image and/or other code in there:
HTML Code:
<div id="dynloadarea" style="width:50px;height:225px"><img src="photo1.jpg" border="0"></div>
or:
HTML Code:
<div id="dynloadarea" style="width:50px;height:225px"><a href="some_page.htm"><img src="photo1.jpg" border="0"></a></div>
Virtually any combination of ordinary HTML and javascript can be used. But remember, whatever it is will get overwritten once the script is activated via a mouseover of a thumbnail. So, use something you would be happy being temporary. You could even do something like so:
HTML Code:
<div id="dynloadarea" style="width:50px;height:225px"><script type="text/javascript">document.write('<img src="photo1.jpg" border="0">')</script><noscript>JavaScript is Required for this Feature</noscript></div>
Bookmarks