hi everyone,<br><br>i am just starting to learn JavaScript and could really use some help. i am trying to do an image swap code with onmouseover. i am just copying and pasting the code out of a book but can't figure out what to change in order to get it to work. it is from the o'reilly JavaScript book. here is the code:<br><br><script type="text/javascript"><br>function rollOver()<br>{<br>var images = document.getElementsByTagName("img");<br>for(var i = 0; i < images.length; i++);<br> {<br> var image = images[i];<br> <span style="background-color: transparent;">var rolloverURL = image.getAttribute("rollover");</span><br> if (rolloverURL) addRollover(image, rolloverURL);<br> }<br>} <br></script><br><script><br>if (window.addEventListener)<br> window.addEventListener("load", rollOver, false);<br>else if
(window.attachEvent)<br> window.attachEvent("onload", rollOver); <br></script><br><br>so the first part is the actual function and the second calls it right? my question is which parts need to be modified. i have tried entering url's and still get nothing. the latest error i get is that the image has no properties. can someone help me out with this. i would really appreciate it. i was told JavaScript was fairly easy to learn, i think i was lied to.<br><br>Jeff<br><p> 
<hr size=1>Sick sense of humor? Visit Yahoo! TV's
<a href="http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222">Comedy with an Edge </a>to see what's on, when.