R
Ross
I have been using the following script to return a scrollbar to the position
it was in before the data was posted. It works in ie but not in firefox.
Thanks,
R.
<script type="text/javascript">
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("menu_holder_inside").scrollTop = strPos;
}
}
function SetDivPosition(){
var intY = document.getElementById("menu_holder_inside").scrollTop;
// document.title = intY;
document.cookie = "yPos=!~" + intY + "~!";
}
</script>
and on the div
<div id="menu_holder_inside" onscroll="SetDivPosition()">
it was in before the data was posted. It works in ie but not in firefox.
Thanks,
R.
<script type="text/javascript">
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("menu_holder_inside").scrollTop = strPos;
}
}
function SetDivPosition(){
var intY = document.getElementById("menu_holder_inside").scrollTop;
// document.title = intY;
document.cookie = "yPos=!~" + intY + "~!";
}
</script>
and on the div
<div id="menu_holder_inside" onscroll="SetDivPosition()">