Forum Moderators: open
This is the div <div id="x">
then the table, on overflow scrollbars come.
onUnload of page i set the position using
document.getElementById("x").scrollTop
then i reaslised that that was for the vertical scroll bar, and since my scrollbar is a horizontal one i used scrollLeft.
both the params give me value as zero.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Scroll</title>
<script>function showscroll(posTop,posLeft){
document.getElementById('scrollpos').value=posTop+" ; " +posLeft;
}
</script>
</head>
<body>
<input type='text' id='scrollpos' />
<div style="height :100%;width:100%; overflow:auto;" onscroll="showscroll(this.scrollTop,this.scrollLeft)">
<div id="scroller" style="height:5200px;width:6000;" > </div>
</div>
</body>
</html>