How to set focus?

Results 1 to 3 of 3

Thread: How to set focus?

  1. #1
    Sv Guest

    Default How to set focus?

    Hello! <BR>I&#039m a newbe in ASP. I have a form <BR>&#060;form name="first" method="post" action="DBpage.asp"&#062;<BR>and text<BR>&#060;input type="text" name="Surname" value=""&#062; <BR>on it. I need to set focus on that text when I show my form.<BR>How can I do it in ASP tags &#060;% ..%&#062;<BR>Thanks ahead

  2. #2
    Join Date
    Dec 1969

    Default RE: How to set focus?

    Something which is done on client side i.e. javascript<BR>Outside the &#060;% %&#062;<BR><BR>function window_onload() {<BR>document.first.Surname.focus();<BR>}<BR>

  3. #3
    Sv Guest

    Default Thank you very much!

    I forget that I have to put document.first.Surname.focus();<BR> in JavaScript tags

Posting Permissions

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