accmats
asked on
When page loads, How can I go to the bottom of the page?
Every time I do a postback my page goes back to the top of the page. My users have to keep scrolling down. I have turned on Smart Navagation on my page but that has no effect. Not sure why either. My form pulls in alot of user controls. On each post back it adds another user control to the bottom of the web form. Thats the control I would want to have focus for lack of a better name.
Anyone got a suggestion on either how to set focus to a paticular User Control or how to make the page go to the bottom when it loads?
Thanks for your time!!!
Anyone got a suggestion on either how to set focus to a paticular User Control or how to make the page go to the bottom when it loads?
Thanks for your time!!!
ASKER
what would be the syntax of that #Bottom and would I put that in the page load event?
no, just put after the adress on the link like http://www.nowhere.com/page.aspx#start1
just use this javascript function:
function scrollToCoordinates() {
window.scrollTo(0,800)
}
call it from body onLoad :
<body onload="javascript:scrollT oCoordinat es()" MS_POSITIONING="FlowLayout ">
function scrollToCoordinates() {
window.scrollTo(0,800)
}
call it from body onLoad :
<body onload="javascript:scrollT
nooo, don't use anchors! You get the double-click effect when the page loads. Use Javascript and the ScrollIntoView() function.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/scrollintoview.asp
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/scrollintoview.asp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Put an anchor to the bottom of your page,
<a name="bottom">
and call your page with #bottom at the end.
During the postbacks it should go to bottom anchor.
This might work.