I have a div as such:
I contains a few hundred records and allows me to select an i
Disclaimer - not my code, but I've seen this used before:
window.onload = function(){
var strCook = document.cookie;
if(strCook.indexOf("!~")!=0){
var intS = strCook.indexOf("!~");
var intE = strCook.indexOf("~!");
var strPos = strCook.substring(intS+2,intE);
document.getElementById("divTest").scrollTop = strPos;
document.getElementById("divTest").scrollTop = strPos;
}
}
function SetDivPosition(){
var intY = document.getElementById("divTest").scrollTop;
document.cookie = "yPos=!~" + intY + "~!";
}
The idea is to store the position of the scrollbar in a cookie. Another (better?) option would be to store it in a hidden field (or fields). Hope that gets you going...