Question : scroll position javascript

i have some script which i was hoping will remember my scroll position and move my explorer window upon asp.net postback.





I am getting an object expected error. I don't usualy program in javascript so I am finding it hard to de-bug.

Also are the variables in one function see in another (i.e are they public variables)?

Answer : scroll position javascript

And yes, you need to define the vars outside the functions to access them from other functions

var xposition;
var yposition;
function saveScrollC() {
xposition = document.body.scrollLeft:window.pageXOffset;
 yposition = document.body.scrollTop:window.pageYOffset;
}

Random Solutions  
 
programming4us programming4us