Hello,
How do i set focus on text box or any web control in my
aspx.vb page..pls help</form>
<script>
document.all.Button1.focus();
</script>
</body>
</html
"Saifee" <saifthe@.yahoo.com> ??
news:ee5b01c3bd4a$768875f0$a601280a@.phx.gbl...
> Hello,
> How do i set focus on text box or any web control in my
> aspx.vb page..pls help
thanx for the script worked fine, but then how do i set
the focus on a control in run time
say if the user do not enter a value in a textbox,
i dsiplay a message n then have to set the focus to the
textbox
>--Original Message--
></form>
><script>
>document.all.Button1.focus();
></script>
></body>
></html>
>"Saifee" <saifthe@.yahoo.com> ??
>news:ee5b01c3bd4a$768875f0$a601280a@.phx.gbl...
>> Hello,
>> How do i set focus on text box or any web control in my
>> aspx.vb page..pls help
>
>.
Here is an example...
<html>
<body>
<form runat="server">
<asp:TextBox ID="TextBox1" RunAt="server" /><br>
<asp:TextBox ID="TextBox2" RunAt="server" /><br>
</form>
</body>
</html
<script language="javascript">
document.forms[0].TextBox1.focus ();
</script
<asp:placeholder id=script1 runat=server Visible=False
EnableViewState=False>
<script>
alert('please input something');
document.all.TextBox1.focus();
</script>
</asp:placeholder>
</form
to enable the script once , using C#:
placeholder.Visible=true;
"Saifee" <saifthe@.yahoo.com> ??
news:041301c3bd55$9ed5fe00$a401280a@.phx.gbl...
> thanx for the script worked fine, but then how do i set
> the focus on a control in run time
> say if the user do not enter a value in a textbox,
> i dsiplay a message n then have to set the focus to the
> textbox
> >--Original Message--
> ></form>
> ><script>
> >document.all.Button1.focus();
> ></script>
> ></body>
> ></html>
> >"Saifee" <saifthe@.yahoo.com> ??
> >news:ee5b01c3bd4a$768875f0$a601280a@.phx.gbl...
> >> Hello,
> >> How do i set focus on text box or any web control in my
> >> aspx.vb page..pls help
> >.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment