Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
It seems working on Google Chrome but not in IE7. Why is it?

Can anyone please tell me why? I've search the net still has no answer . Thank you so much in advance :)

ON HEADER:
XML
<script type="text/javascript">
        window.onload = function () {
            var div = document.getElementById("divscroll");
            var div_position = document.getElementById("div_position");
            var position = parseInt('<%=Request.Form("div_position") %>');
   if (isNaN(position)) {
       position = 0;
   }
   div.scrollTop = position;
   div.onscroll = function () {
       div_position.value = div.scrollTop;
   };
};
</script>


ON BODY:
XML
<div class="scroll" id="divscroll">
                <input type="hidden" id="div_position" name="div_position" />
Posted

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900