hi, fairly urgently need help with script to scroll contents within my browser window, and then scroll back, both when prompted.
I got hold of some script to do the former, but i wasn't able to adapt it to create a working link that scrolled back.
The script probably contains more (or less) info than needed...
<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">
<!--
var scrollPageRunning = false
function scrollPage(iStartPos,iEndPos) {
if (scrollPageRunning == false) {
scrollPageRun(iStartPos, iEndPos)
}
}
function scrollPageRun(iStartPos,iEndPos) {
iNextXPos = iStartPos + 10;
if (iNextXPos != iEndPos) {
scrollPageRunning = true
window.scroll(iNextXPos,0);
intervalID = setTimeout("scrollPageRun(" + iNextXPos + "," + iEndPos + ")",0.1);
} else {
scrollPageRunning = false
return false;
}
}
//-->
</SCRIPT>
then actioned by the following href:
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"java script:scrollPage(0,418);" ONMOUSECLICK="window.status='right';return true">scroll right</A>
any help appreciated. please.
ta
I got hold of some script to do the former, but i wasn't able to adapt it to create a working link that scrolled back.
The script probably contains more (or less) info than needed...
<SCRIPT LANGUAGE="Javascript" TYPE="text/javascript">
<!--
var scrollPageRunning = false
function scrollPage(iStartPos,iEndPos) {
if (scrollPageRunning == false) {
scrollPageRun(iStartPos, iEndPos)
}
}
function scrollPageRun(iStartPos,iEndPos) {
iNextXPos = iStartPos + 10;
if (iNextXPos != iEndPos) {
scrollPageRunning = true
window.scroll(iNextXPos,0);
intervalID = setTimeout("scrollPageRun(" + iNextXPos + "," + iEndPos + ")",0.1);
} else {
scrollPageRunning = false
return false;
}
}
//-->
</SCRIPT>
then actioned by the following href:
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"java script:scrollPage(0,418);" ONMOUSECLICK="window.status='right';return true">scroll right</A>
any help appreciated. please.
ta