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>&lt;script type="text/javascript"&gt;<br>function rollOver()<br>{<br>var images = document.getElementsByTagName("img");<br>for(var i = 0; i &lt; images.length; i++);<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; var image = images[i];<br>&nbsp;&nbsp;&nbsp; <span style="background-color: transparent;">var rolloverURL = image.getAttribute("rollover");</span><br>&nbsp;&nbsp;&nbsp; if (rolloverURL) addRollover(image, rolloverURL);<br>&nbsp;&nbsp;&nbsp; }<br>}&nbsp;&nbsp;&nbsp; <br>&lt;/script&gt;<br>&lt;script&gt;<br>if (window.addEventListener)<br>&nbsp;&nbsp;&nbsp; window.addEventListener("load", rollOver, false);<br>else if
 (window.attachEvent)<br>&nbsp;&nbsp;&nbsp; window.attachEvent("onload", rollOver);&nbsp;&nbsp;&nbsp; <br>&lt;/script&gt;<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&nbsp; 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>&#32;
      <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.