The WebToolBox
Cursor Scroller

HOME

Slide-in Menu
Background Changing
DHTML Analog Clock
Static Menu Script
Scrolling Text Link
Textual Tooltip Script
Mouseover Link Bar
Bouncing Message
Shock Wave Text
Nudging Text
Roller Coaster Text
Text Animator
Typing Text Script
Pulsating Text
Cross Browser Marquee
Cursor Scroller
Cursor Trailer Text
Dropdown Menu
Text Area
Disco Background Effect
Scientific Calculator
Basic HTML Tutorials
Guide to Javascripts
Color Chart
Hex Color Codes
Contact Information

To copy,highlight codes below and press Ctrl+C,to paste click left then right in your html text area.Edit.(Note:Poorly formatted codes can produce unexpected results.)

Cursor Scroller

<html>

<body style="width:100%;overflow-x:hidden;overflow-y:scroll">

<SCRIPT language="JavaScript1.2">
<!--

/*
Cursor scroller script- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

//1) set message to display
var scroller_msg='Welcome to The WebtoolBox, the premier HTML code library online!'
//2) set whether message should auto disappear after x seconds (0=perpetual).
//Note that double clicking page will also dismiss message
var dismissafter=0

var initialvisible=0
if (document.all)
document.write('<marquee id="curscroll" style="position:absolute;width:150px;border:1px solid black;font-size:14px;background-color:white;visibility:hidden">'+scroller_msg+'</marquee>')

function followcursor(){
//move cursor function for IE

if (initialvisible==0){
curscroll.style.visibility="visible"
initialvisible=1
}

curscroll.style.left=document.body.scrollLeft+event.clientX+10
curscroll.style.top=document.body.scrollTop+event.clientY+10
}

function dismissmessage(){
curscroll.style.visibility="hidden"
}


if (document.all){
document.onmousemove=followcursor
document.ondblclick=dismissmessage
if (dismissafter!=0)
setTimeout("dismissmessage()",dismissafter*1000)
}



//-->
</SCRIPT>

</body>
</html>