home *** CD-ROM | disk | FTP | other *** search
Wrap
<ccResource> <ccTitle> Alert Scrollbar </ccTitle> <ccCategory> Browser </ccCategory> <ccDescription> This unique scroller scrolls text at the very top of the page, making it hard to ignore. </ccDescription> <ccInstructions> The code goes only inside the BODY tags. You can change the items below to suit your needs. </ccInstructions> <ccHeadContent> </ccHeadContent> <ccBodyContent> <marquee id="alertit" style="position:absolute;left:0px;top:0;background-color:#FFFFE6" onMouseover="this.scrollAmount=1" onMouseout="this.scrollAmount=speed"></marquee> <script type="text/javascript"> //Customize your message here. Use any HTML desired: var themsg='<span style="font:italic 22px Arial;color:red;"><b>Breaking News: Microsoft Stock up 10 points! Source: <a href="http://cnn.com" target="_new">CNN</a></b></span>' var speed=6 //speed of scroller (1-10 or more) var loops=2 //specify number of times message scrolls across screen (an integer or "infinite") function populatescroller(){ var windowwidth=iecompattest().clientWidth document.getElementById("alertit").innerHTML=themsg document.getElementById("alertit").style.width=windowwidth document.getElementById("alertit").scrollAmount=speed document.getElementById("alertit").scrollDelay=20 document.getElementById("alertit").loop=loops document.getElementById("alertit").onfinish=function(){ document.getElementById("alertit").style.visibility="hidden" } } function iecompattest(){ return (document.compatMode!="BackCompat")? document.documentElement : document.body } if (document.all && document.getElementById){ window.onload=populatescroller window.onresize=populatescroller } </script> </ccBodyContent> <ccElementContent> <ccElementName></ccElementName> <ccElementAction></ccElementAction> </ccElementContent> <ccExtraData> </ccExtraData> </ccResource>