M
Mad Scientist Jr
I have autopostback turned on for Textbox1. When the user tabs out of
it, the codebehind recalculates some other fields based on its value,
and the user should be able to start typing a value in the next
control Textbox2. However, when the page is rendered, the focus goes
back to Textbox1. In order to go to the next control the user has to
hit tab twice - once to recalculate, and once to tab out of the
control. Is there some way to make it so that a single tab
recalculates AND brings the user to the next control?
I have tried putting in the following javascript to do it after
recalculation, but it doesn't seem to work:
(DO RECALCULATIONS HERE)
....
' SET FOCUS ON NEXT CONTROL
'Page.RegisterClientScriptBlock("SetFocus", "<script
language='javascript'>document.form.Texboxt2.focus();</script>")
it, the codebehind recalculates some other fields based on its value,
and the user should be able to start typing a value in the next
control Textbox2. However, when the page is rendered, the focus goes
back to Textbox1. In order to go to the next control the user has to
hit tab twice - once to recalculate, and once to tab out of the
control. Is there some way to make it so that a single tab
recalculates AND brings the user to the next control?
I have tried putting in the following javascript to do it after
recalculation, but it doesn't seem to work:
(DO RECALCULATIONS HERE)
....
' SET FOCUS ON NEXT CONTROL
'Page.RegisterClientScriptBlock("SetFocus", "<script
language='javascript'>document.form.Texboxt2.focus();</script>")