Building A Great DHTML Chaser - DHTML Lab | 9
DHTML in GreatEqualizer.com, I:
Building A Great DHTML Chaser
You made it.... Or you skipped to the end. Either way, you're very close to having your very own chaser element on your website. Here's how to do it:
- Add a style definition to the head of your document describing where the chaser should be positioned initially:
<STYLE TYPE='text/css'> #myChaser { position:absolute; left:200px; top:0px; width:250px; color:#555555; font-family:verdana, arial, sans-serif; font-size:12px; } </STYLE>
- Add the <DIV> element to your HTML with the proper ID and whatever content you desire:
<DIV ID='myChaser'> This is the actual chaser element. You can put any valid HTML in here, and style it however you wish. </DIV>
-
Modify the first few lines of the chaser.js script to fit your circumstance:
var oChaser = { topMargin : 25, callRate : 35, ceiling : 55, slideTime : 1200, isIE : document.all ? true : false, chaserDiv : document.all ? document.all.chaser : document.chaser }
-
Add the script library to your page after the DIV element:
<SCRIPT LANGUAGE='JavaScript' SRC='chaser.js'></SCRIPT>
The chaser.js file and a sample HTML page can be downloaded in ZIP format.
That's it! have fun with this new tool, and hopefully I'll talk to you all soon with the next installment of this series where I'll deal with writing to the chaser.
Produced by Aaron Boodman and
All Rights Reserved. Legal Notices.Revised: Sept 19, 2000
URL: https://www.webreference.com/dhtml/column37/9.html