setfocus on textbox

Results 1 to 3 of 3

Thread: setfocus on textbox

  1. #1
    Rich G Guest

    Default setfocus on textbox

    Hi, How do you set focus on a text box using VBScript? I can do it using object.method in VB and Access, but having trouble doing it in VBScript.<BR>Thanks in advance.

  2. #2
    BalletChick Guest

    Default RE: setfocus on textbox

    You wouldn&#039t really do it in VBScript, you&#039d do it in Javascript in the output HTML... Example:<BR><BR><BR><BR>&lt;script&gt;<BR>&lt;!--<BR>function setfocus() {<BR>document.formname.textboxname.focus();<BR>}<B R>// --&#062;&lt;/script&gt;<BR><BR>&lt;body onLoad="setfocus()"&gt;<BR>&lt;form name="formname"&gt;&lt;input type="text" name="textboxname" size="20"&gt;&lt;/form&gt;<BR>&lt;/body&gt;

  3. #3
    Join Date
    Dec 1969

    Default Despite what you ask

    In case you don&#039t have this one<BR><BR>javascript style <BR>which works in ie.<BR><body onLoad="window.document.yourForm.frmfield.focus(); "<BR><BR>skol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts