PDA

View Full Version : Scroll Bar Fuction - Help Me



kannankrp
12-27-2005, 07:33 AM
when i load the page he scrollbar in the div tag get refreshed and move to top. But while refreshing page it should refresh and stand at botom.....please help me any one knows.........

jscheuer1
12-27-2005, 09:00 AM
I'm not exactly sure what you mean but, try out this demo:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div id="huh" style=overflow:auto;width:200px;height:150px;">
zfgyuhbgvzulvghyVgyhrdbvgf djbvkjbgd hcgvfzkdgv hfhkdjgvjghvc hjvjbcbv ihvjkvhb djkhkJH klhvzh<br>
jkNBvkjnkbn dkvknbnjzv knklnznbl knbvknbnzb lkbnvnbnvb nbvbncbn knvbkbnlk<br>
zfgyuhbgvzulvghyVgyhrdbvgf djbvkjbgd hcgvfzkdgv hfhkdjgvjghvc hjvjbcbv ihvjkvhb djkhkJH klhvzh<br>
jkNBvkjnkbn dkvknbnjzv knklnznbl knbvknbnzb lkbnvnbnvb nbvbncbn knvbkbnlk<br>
zfgyuhbgvzulvghyVgyhrdbvgf djbvkjbgd hcgvfzkdgv hfhkdjgvjghvc hjvjbcbv ihvjkvhb djkhkJH klhvzh<br>
jkNBvkjnkbn dkvknbnjzv knklnznbl knbvknbnzb lkbnvnbnvb nbvbncbn knvbkbnlk<br>
zfgyuhbgvzulvghyVgyhrdbvgf djbvkjbgd hcgvfzkdgv hfhkdjgvjghvc hjvjbcbv ihvjkvhb djkhkJH klhvzh<br>
jkNBvkjnkbn dkvknbnjzv knklnznbl knbvknbnzb lkbnvnbnvb nbvbncbn knvbkbnlk<br>
zfgyuhbgvzulvghyVgyhrdbvgf djbvkjbgd hcgvfzkdgv hfhkdjgvjghvc hjvjbcbv ihvjkvhb djkhkJH klhvzh<br>
jkNBvkjnkbn dkvknbnjzv knklnznbl knbvknbnzb lkbnvnbnvb nbvbncbn knvbkbnlk<br>HI
</div>
<script type="text/javascript">
document.getElementById('huh').scrollTop=0;
setTimeout("document.getElementById('huh').scrollTop=100000", 0)
</script>
</body>
</html>

Notes: The script must follow the division. I know it looks more complicated than it needs to be but both FF and IE each did odd things under certain circumstances without the two calls, the one a timeout, as shown.

kannankrp
01-02-2006, 08:20 AM
thank you for reply:mad: