P
Pai
Hello there,
I have a DropDown ListBox which is placed at the bottom of the .aspx
page, The AutoPostBack propoerty of the DropDown ListBox is set to
true.
When I change the selection of the elements in
the dropdown list box the top section of the page gets visible,
becuase the page has been posted back.
I need the focus to go to the Drop Down List Box.
I have the following code placed in the Page_Load event of the form...
this.SetFocus( this.DropDownList1 );
and the SetFocus function as follows
protected void SetFocus( System.Web.UI.Control ctrl )
{
string s = "<SCRIPT
language=\"javascript\">document.getElementById('"
+ ctrl.ID + "').focus() </SCRIPT>";
RegisterStartupScript("focus", s );
}
The focus does get set I belive to the DropDown list box, I am not
sure as when I press the tab button it goes to the next control so I
am asssuming the control has got the focus. The top section of the
page is visible, the user in such a case would be lost as to what has
happened.
I need the dropdown list box to be visible on the screen...
Thanks in advance,
Pai
I have a DropDown ListBox which is placed at the bottom of the .aspx
page, The AutoPostBack propoerty of the DropDown ListBox is set to
true.
When I change the selection of the elements in
the dropdown list box the top section of the page gets visible,
becuase the page has been posted back.
I need the focus to go to the Drop Down List Box.
I have the following code placed in the Page_Load event of the form...
this.SetFocus( this.DropDownList1 );
and the SetFocus function as follows
protected void SetFocus( System.Web.UI.Control ctrl )
{
string s = "<SCRIPT
language=\"javascript\">document.getElementById('"
+ ctrl.ID + "').focus() </SCRIPT>";
RegisterStartupScript("focus", s );
}
The focus does get set I belive to the DropDown list box, I am not
sure as when I press the tab button it goes to the next control so I
am asssuming the control has got the focus. The top section of the
page is visible, the user in such a case would be lost as to what has
happened.
I need the dropdown list box to be visible on the screen...
Thanks in advance,
Pai