J
JC
I'm sure you've all seen the save scroll position from 4 guys from
rolla which can be found here >
http://aspnet.4guysfromrolla.com/articles/111704-1.aspx
BUT
try to get that to work AND still be able to set the focus to a
control.
Here's the problem, when you set the focus by using the
registerstartupscript method the control gets the focus after the
scroll position has been set. When this happens the scroll position
gets set a second time but it sets the focused control at the bottom
of your page.
To test-
(you would need the scroll position code from the 4 guys site)
Build a page with a whole lot of <br>'s and in the middle put a
textbox and at the end put a button. In the button call
RegisterStartupScript("focus", "<script language=""JavaScript"">" &
vbCrLf & vbTab & "document.getElementById('TextBox3').focus();" &
vbCrLf & "<" & "/script>")
I want my page to stay scrolled to the bottom but it scrolls to the
point of the textbox.
Any ideas on how to fix this would be AMAZINGLY appreciated. I don't
need to use this code just need it to work.
No, smartnavigation will not work since you can not focus with that
either
(or if you can, let me know but I'd rather not use it)
contact me at the e-mail or at ujjc001@ on my gmail account but please
post here too for others to share.
rolla which can be found here >
http://aspnet.4guysfromrolla.com/articles/111704-1.aspx
BUT
try to get that to work AND still be able to set the focus to a
control.
Here's the problem, when you set the focus by using the
registerstartupscript method the control gets the focus after the
scroll position has been set. When this happens the scroll position
gets set a second time but it sets the focused control at the bottom
of your page.
To test-
(you would need the scroll position code from the 4 guys site)
Build a page with a whole lot of <br>'s and in the middle put a
textbox and at the end put a button. In the button call
RegisterStartupScript("focus", "<script language=""JavaScript"">" &
vbCrLf & vbTab & "document.getElementById('TextBox3').focus();" &
vbCrLf & "<" & "/script>")
I want my page to stay scrolled to the bottom but it scrolls to the
point of the textbox.
Any ideas on how to fix this would be AMAZINGLY appreciated. I don't
need to use this code just need it to work.
No, smartnavigation will not work since you can not focus with that
either
(or if you can, let me know but I'd rather not use it)
contact me at the e-mail or at ujjc001@ on my gmail account but please
post here too for others to share.