Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > another pair of eyes...

Reply
Thread Tools

another pair of eyes...

 
 
=?Utf-8?B?cm9kY2hhcg==?=
Guest
Posts: n/a
 
      07-12-2006
hey all,

can someone please help me debug the following code to auto scroll a window
for my asp.net page? i don't think i have the page load syntax or few
possible other bugs. The funny thing is the vb version of this is almost
identical and works i missing something.

<script type="text/javascript">

var elBody;
var varChange;
var varAllowDirectionChange ;
var varMilliSecondScroll;


function Page_OnLoad()
{
elBody = window.document.body
varChange=1;
varAllowDirectionChange = true;
varMilliSecondScroll = 25;
window.document.body.scrolltop = 2;
doScroll();
}

function doScroll() {
if(! left(navigator.appVersion,1) => 4){ Exit Function }
sHeight = elBody.scrollheight;
cHeight = elBody.clientheight;
varTarget = elBody.scrolltop + varChange;
if(varTarget < 0){ varTarget = 0 }
elBody.scrolltop = varTarget;
x = SetTimeOut("doScroll()",varMilliSecondScroll,"VBSc ript");
if(! varAllowDirectionChange){ Exit Function }
if(sHeight-cHeight => varTarget-varChange){ varAbove = True }else{
varAbove = False }
if(sHeight-cHeight <= varTarget+varChange){ varBelow = True }else{
varBelow = False }
if(varAbove && varBelow){ varChange = varChange * -1 }
if(varTarget => 0){ varAbove = True }else{ varAbove = False }
if(varTarget <= 0+abs(varChange)){ varBelow = True }else{ varBelow = False }
if(varAbove && varBelow){ varChange = varChange * -1}
}
</script>


thanks,
rodchar
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Another easy pair of questions HMS Surprise Python 3 05-08-2007 09:38 PM
J2ee: need another pair of eyes. DaLoverhino Java 1 11-22-2005 07:48 PM
Object expected; can't find it. Need another pair of eyes. Laiverd.COM Javascript 9 08-05-2004 06:46 PM



Advertisments