You are here: irt.org | FAQ | DHTML | Q1380 [ previous next ]
Try:
<html> <head> <script language="JavaScript"><!-- var ob; function mousedown(e) { if (document.layers) ob = document.layers[e.target.name], Y = e.y; else if (document.all) ob = event.srcElement.parentElement.style, Y = event.offsetY; } function mousemove(e) { if (ob && document.layers && (e.pageY-Y) < 201 && (e.pageY-Y) > 49) ob.moveTo(10, (e.pageY-Y)); else if (ob && document.all && (event.clientY - Y) < 201 && (event.clientY - Y) > 49) ob.pixelTop = event.clientY-Y + document.body.scrollTop; } function mouseup() { ob = null; } if (document.layers) document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP); document.onmousedown = mousedown, document.onmousemove = mousemove, document.onmouseup = mouseup; // --></script> </head> <body> <div style="position:absolute; left:10; top:50;"> <table cellspacing="0" cellpadding="0" border="0"><tr><td bgcolor="#cccccc" width="25" height="150"> </td></tr></table> </div> <div id="s" style="position:absolute; left:10; top:50;"> <img src="slider.gif" name="s" width="25" height="2" border="0"> </div> </body> </html>