Give focus to input box when i use window.open

Results 1 to 4 of 4

Thread: Give focus to input box when i use window.open

  1. #1
    Join Date
    Dec 1969
    Posts
    49

    Default Give focus to input box when i use window.open

    I use window.open to display a new window, when the window is opened i want to give the focus to the input box.Is there a way i can acheive this?

  2. #2
    Join Date
    Dec 1969
    Posts
    1,024

    Default RE: Give focus to input box when i use window.open

    Put it as an onLoad Event in the <body> tag.

  3. #3
    Join Date
    Dec 1969
    Posts
    49

    Default RE: Give focus to input box when i use window.open

    I am using the following piece of code to give focus but it does not work:<BR>&#060;script language="JavaScript"&#062;<BR>function GiveFocus()<BR>{<BR>document.formB.name.focus=true ;<BR>}<BR>&#060;/script&#062;<BR>&#060;BODY onLoad="GiveFocus()"&#062;<BR><BR>&#060;input name="name" size="25" maxLength="50"&#062;

  4. #4
    Join Date
    Dec 1969
    Posts
    3,961

    Default RE: Give focus to input box when i use window.open

    &#060;BODY onLoad="document.formB.name.focus(); return false;"&#062;


Posting Permissions

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