Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ScrollBar heigth

Status
Not open for further replies.

sherlock1305

Programmer
Jul 10, 2001
21
CA
Hi,

first, sorry for my english, it's not my first language!

Here is my question.
Is there a way to control the scroll bar when clicking on it???

I've tried this code...

<SCRIPT>
function ComponentSnapShot(){
var sElem = &quot;&quot;;
sElem = document.body.componentFromPoint(event.clientX, event.clientY);
if (sElem==&quot;scrollbarDown&quot;)
{
window.scrollBy(0,1200);
// alert(&quot;1&quot;);
}
if (sElem==&quot;scrollbarUp&quot;)
{
window.scrollBy(0,-1200);
// alert(&quot;2&quot;);
}
if (sElem==&quot;scrollbarPageDown&quot;)
{
window.scrollBy(0,20);
// alert(&quot;3&quot;);
}
if (sElem==&quot;scrollbarPageUp&quot;)
{
window.scrollBy(0,-20);
// alert(&quot;4&quot;);
}
}
</SCRIPT>
</HEAD>
<BODY onmousedown=ComponentSnapShot() LANGUAGE=javascript>

...but it just works with &quot;Alerts&quot;?!?!?
Does anyone know why?
...or anyone has another solution???

Thanks a lot.
Sherlock
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top