[Javascript] JS Marquee - HTML4.01 Strict DTD

Troy III Ajnej trojani2000 at hotmail.com
Sun Aug 6 20:56:45 CDT 2006


> What did I do wrong?
Tedd,Implementation of the code is reporting "error in line 0" from firefox while the BOX is being rendered ~correctly the script is failing. Ie is failing to render the box with rounded corners correctly but the script is at least initialized.
 
The main problem lies in the first line of code:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd">
 
You've declared Strict DTD while it obviously isn't.
 
Here is a complete HTML 4.01 strict and VALIDATED Page***   saved using UTF-8   **************************
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"   "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><TITLE>SCROLL IMAGES</TITLE><style type="text/css"> #holder{ position:absolute; left:45px; top:116px; width:344px; height:84px; overflow:hidden; } #roller {  white-space:nowrap; margin-left:0;}</style></HEAD>
<BODY>
<DIV ID=holder><div id="roller"><img src="http://xn--ovg.com/marquee/images/1.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/2.jpg" alt=''> <img src="http://xn--ovg.com/marquee/images/3.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/4.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/5.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/6.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/7.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/8.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/9.jpg" alt=''><!--Repeating the first three to complete the circle--><img src="http://xn--ovg.com/marquee/images/1.jpg" alt=''><img src="http://xn--ovg.com/marquee/images/2.jpg" alt=''> <img src="http://xn--ovg.com/marquee/images/3.jpg" alt=''>
</div></DIV>
<script type="text/javascript">var roller = document.getElementById('roller')var i=0;function rollnow(){ if(i < 1040){  i++;  roller.style.marginLeft=-i+"px"; }else{i=-4} window.setTimeout(rollnow, 20);}onload=rollnow</script>
</BODY></HTML>******************
With this revision, there is no need for image preloading script in your header.
Test this version locally first, than try putting it inside the "BOX". 
If it fails after this, you should go back and recheck the box constructor once again.
Cheers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                         Troy III                           progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________________________
Try Live.com - your fast, personalized homepage with all the things you care about in one place.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20060807/a1d7f159/attachment.htm>


More information about the Javascript mailing list