<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>&gt; http://xn--ovg.com/marquee/index3.php<BR>&gt; <BR>&gt; What&nbsp;did&nbsp;I&nbsp;do&nbsp;wrong?<BR>&gt; <BR>&gt; tedd<BR><BR>
The obvious:<BR>
An attempt&nbsp;to manipulate the DOM before it comes to&nbsp;existence<BR>
is being made because you've misplaced the script.<BR>
&nbsp;<BR>
The first line of script will cause the error trying to assign:<BR>
&nbsp;<BR>
var roller = document.getElementById('roller')<BR>
&nbsp;<BR>
Because the DIV with ID "roller" is not created yet.<BR>
Please, place the script at least one line after the&nbsp;"roller" closing tag<BR>
and everything will come back to normal - it will loop forever.<BR>
Or simply copy - paste this code: [with the same order!] <BR>
(Given are new dimensions to suite your pictures&nbsp;size too)<BR>
&nbsp;<BR>
&lt;style&gt;<BR>#holder{<BR>&nbsp;position:absolute;<BR>&nbsp;left:45px;<BR>&nbsp;top:116px;<BR>&nbsp;width:344px;<BR>&nbsp;height:84px;<BR>&nbsp;overflow:hidden;<BR>&nbsp;}<BR>
#roller {<BR>&nbsp; white-space:nowrap; margin-left:0;<BR>}<BR>
&lt;/style&gt;<BR>
<BR>&nbsp;&nbsp;&nbsp;&lt;div id="holder"&gt;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&lt;div id="roller"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/1.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/2.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/3.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/4.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/5.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/6.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/7.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/8.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/9.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/1.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/2.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;img src="images/3.jpg" alt="" &gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/div&gt;<BR>&nbsp;&nbsp;&nbsp;&lt;/div&gt;<BR>
&nbsp;<BR>
&lt;SCRIPT&gt;<BR>var roller = document.getElementById('roller')<BR>var i=0;<BR>
function rollnow(){<BR>&nbsp;if(i &lt; 1040){<BR>&nbsp;&nbsp;i++;<BR>&nbsp;&nbsp;roller.style.marginLeft=-i;<BR>&nbsp;&nbsp;}else{i=-4}<BR>&nbsp;}<BR>
&nbsp;&nbsp; window.setInterval(rollnow, 20);<BR>&lt;/SCRIPT&gt;<BR>
&nbsp;<BR>
The correct calculation is: 9 (images) * 112 (actual imgs width) +&nbsp; ( 9 - 1 * 4 ) = 1040 px<BR>
Tip: To get this value automaticaly&nbsp;"comment" the repeated&nbsp;images 1,2,3,&nbsp;in the code and <BR>
&nbsp;alert(roller.offsetWidth) inside the script in IE or NN (except that NN will give exact value only<BR>
in the second alert because the first time it will report the "holder" width&nbsp;instead of the "roller")<BR>
and don't forget to uncomment the images after you've written the required strip width; this time<BR>
being 1040.<BR>
&nbsp;<BR>
P.S.:<BR>
!!! I've miscalculated the blank space between images for&nbsp;half&nbsp;of it's real width<BR>
in the last post;&nbsp;the correct value is&nbsp;<FONT>4px </FONT>!!!<BR>
<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Troy&nbsp;III<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;progressive&nbsp;art&nbsp;enterprise<BR>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<BR><br /><hr />With MSN Spaces email straight to your blog. Upload jokes, photos and more. It's free! <a href='http://clk.atdmt.com/MSN/go/msnnksac0030000001msn/direct/01/?href=http://www.imagine-msn.com/spaces' target='_new'>It's free!</a></body>
</html>