Losing Focus
-
Members, I am interested in maintaining my tab order on a web page. I have a very simple page with 2 dialog boxes & 2 dropdownlist boxes. Field1 DropDownList1 Field2 DropDownList2 I have the tab order set from left to right from the top down. So, you cursor move from Field1 to DropDownList1, to Field2 and finally to DropDownList2. However, when the selectedindexchanged event fires, I no longer maintain my focus and leave DropDownList1 and land in Field2. Where does the cursor go (besides the address bar of the current webpage) and how to I get the focus to move to the next field in order? Any thoughts would be appreciated. Thank you.
-
Members, I am interested in maintaining my tab order on a web page. I have a very simple page with 2 dialog boxes & 2 dropdownlist boxes. Field1 DropDownList1 Field2 DropDownList2 I have the tab order set from left to right from the top down. So, you cursor move from Field1 to DropDownList1, to Field2 and finally to DropDownList2. However, when the selectedindexchanged event fires, I no longer maintain my focus and leave DropDownList1 and land in Field2. Where does the cursor go (besides the address bar of the current webpage) and how to I get the focus to move to the next field in order? Any thoughts would be appreciated. Thank you.
Since this is a web application, you have no control over the focus from VB.NET. You'll have to add JavaScript to your web page to control the focus. But, I have no idea how to do it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Since this is a web application, you have no control over the focus from VB.NET. You'll have to add JavaScript to your web page to control the focus. But, I have no idea how to do it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Dave, I do know how to set focus with javascript, in fact, I have a utility DLL compiled with my application for setting the focus on a specific control when a web page loads. However, when I put that function in as the last statement of my .SelectedIndexChanged event -- I can see the focus go there, but it does not stay because the page gets refreshed again (I suppose). William
-
Dave, I do know how to set focus with javascript, in fact, I have a utility DLL compiled with my application for setting the focus on a specific control when a web page loads. However, when I put that function in as the last statement of my .SelectedIndexChanged event -- I can see the focus go there, but it does not stay because the page gets refreshed again (I suppose). William
Anonymous wrote: However, when I put that function in as the last statement of my .SelectedIndexChanged event -- I can see the focus go there, but it does not stay because the page gets refreshed again (I suppose). Yes it does. This is why you really can't control the focus from the server-side. The focus must be setup and controlled entirely in client-side JavaScript in your page. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome