473,378 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

another pair of eyes...

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
Jul 12 '06 #1
0 756

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Cristian Hasbun from Chile | last post by:
I need a win32com guru please... i'm not python expert, but i understand mi trouble... Requirements: Hook EyesWeb 3.2.0 (http://www.eyesweb.org) COM Module with Python 2.0.1 i used win32com...
12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
18
by: John Black | last post by:
Hi, I am not familiar with for_each very well, suppoase I have a vector<pair<unsigned int, unsigned int> > vec1 and the contents are {<0x00000000, 0x000000FF>, <0x10000000, 0x2FFFFFFF>} what...
4
by: Old Wolf | last post by:
I have a template class like this: template<typename T, int N> struct Foo { ........... }; which I have successfully specialized for some types, eg:
11
by: Laiverd.COM | last post by:
Hi, In the following function I keep getting a 'Object expected at line 75 char 5' but for the life of me I cannot find the error. Maybe someone would be so kin to have a look? I indicated the...
17
by: Barret Bonden | last post by:
As an old programmer just now looking at VB.net I have a question: How does one simply open one form from another ? I don't mean how does one create a new instance of that form , but rather how...
4
by: Florent Garcin | last post by:
Hello! I would like to use the map structure with a key of Pair<string, string> and an int as the value. Pair is defined as: template <class T1, class T2> class Pair {
3
by: Bailey.Hudson | last post by:
C# is supposed to be an improvement over C++, and I've read a zillion debates on using "using", no "typedef", no "include" to no avail. So how can I implement data dictionary-like functionality in...
5
by: toton | last post by:
Hi, I want to append one vector after another. so like, vector<intv1; ///put some elements to v2. I have a second vector vector<intv2; ///it has some elements. Now I do v1.reserve(v1.size()...
6
by: sandy | last post by:
I think I just need a pair of eyes here... I can't see what I am doing wrong. I am creating a new Class for an assignment, Class File. I have a header and a cpp file. When I try to write the...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.