xStrongTowerx
Programmer
Dear Forum,
Here's my problem:
I'm trying to write a doScroll script that scrolls a text element (div style="overflow: hidden", but no matter what I try, the scrolling does not stop on mouseup.
The inline HTML calls it this way:
<img id="DownArrow" src="images/scroll-down.gif" height="4" width="9" onmousedown="ScrFunct2('ScrollBarDown');" onmouseup="ClearIt();">
This is the script:
Function ScrFunct2(sScrollAction)
BodyText.doScroll(sScrollAction)
window.document.recalc(true)
if BodyText.scrollHeight - BodyText.clientHeight >= BodyText.scrollTop then
DownArrow.setCapture(true)
iTimerID = window.setTimeout("ScrFunct2('ScrollBarDown')",200)
End if
End Function
Function ClearIt()
window.ClearTimeout(iTimerID)
window.document.recalc(true)
End Function
What am I missing here?
Thanks,
xSTx
Here's my problem:
I'm trying to write a doScroll script that scrolls a text element (div style="overflow: hidden", but no matter what I try, the scrolling does not stop on mouseup.
The inline HTML calls it this way:
<img id="DownArrow" src="images/scroll-down.gif" height="4" width="9" onmousedown="ScrFunct2('ScrollBarDown');" onmouseup="ClearIt();">
This is the script:
Function ScrFunct2(sScrollAction)
BodyText.doScroll(sScrollAction)
window.document.recalc(true)
if BodyText.scrollHeight - BodyText.clientHeight >= BodyText.scrollTop then
DownArrow.setCapture(true)
iTimerID = window.setTimeout("ScrFunct2('ScrollBarDown')",200)
End if
End Function
Function ClearIt()
window.ClearTimeout(iTimerID)
window.document.recalc(true)
End Function
What am I missing here?
Thanks,
xSTx