|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Easy one about web formsHow do you set the focus to a text box on a web form? I
want it to go to different boxes depending on the answer to a question. Thanks Ann Hi Ann,
You need the .focus() method in Javascript to do this. Marcie On Tue, 12 Apr 2005 07:33:30 -0700, "Ann Smith" <anonym***@discussions.microsoft.com> wrote: Show quoteHide quote > >How do you set the focus to a text box on a web form? I >want it to go to different boxes depending on the answer >to a question. > >Thanks >Ann Is it not possible to do it in VB then?
Show quoteHide quote >-----Original Message----- >Hi Ann, >You need the .focus() method in Javascript to do this. > >Marcie > >On Tue, 12 Apr 2005 07:33:30 -0700, "Ann Smith" ><anonym***@discussions.microsoft.com> wrote: > >> >>How do you set the focus to a text box on a web form? I >>want it to go to different boxes depending on the answer >>to a question. >> >>Thanks >>Ann > >. > For web forms you have to set focus with client-side script. You can
emit the script from the server, with routines such as RegisterStartupScript. Marcie On Tue, 12 Apr 2005 08:00:28 -0700, "Ann Smith" <anonym***@discussions.microsoft.com> wrote: Show quoteHide quote >Is it not possible to do it in VB then? > >>-----Original Message----- >>Hi Ann, >>You need the .focus() method in Javascript to do this. >> >>Marcie >> >>On Tue, 12 Apr 2005 07:33:30 -0700, "Ann Smith" >><anonym***@discussions.microsoft.com> wrote: >> >>> >>>How do you set the focus to a text box on a web form? I >>>want it to go to different boxes depending on the answer >>>to a question. >>> >>>Thanks >>>Ann >> >>. >> Marcie,
> For web forms you have to set focus with client-side script. You can However I never succeeded with this one, because it has to be absolute the > emit the script from the server, with routines such as > RegisterStartupScript. > last on a page. \\\ When this is your textbox (can as well be an ASP box it is the ID that counts) <INPUT tabindex="1" id="fieldid" type="text" size="27"> //This should be the last rows in your html aspx file <script language="JavaScript"> document.all("fieldid").focus(); </script> </HTML> /// I hope this helps a little bit? Cor
complex grid with comboboxes
Reading from a ini-file and run a program How do I measure the time it takes to copy a file? checkbox in dataset Datagrid 's TextBox input format question. step by step guide to databinding? Positioning a Web Control - Runtime Registering my program as default for my file extension Inherited Treeview control with dynamic context menu. form location |
|||||||||||||||||||||||