Buttons react on "enter"

Results 1 to 2 of 2

Thread: Buttons react on "enter"

  1. #1
    Join Date
    Dec 1969

    Default Buttons react on "enter"

    I have seen pages where onload the focus is on the first input box but when you press the "enter" button the submit button is pressed. Anybody who knows how this works??

  2. #2
    Join Date
    Dec 1969

    Default RE: Buttons react on

    Place the following script somewhere in your HTML code after your form:<BR>&#060;SCRIPT language="JavaScript"&#062; <BR>document.formname.fieldname.focus(); <BR>&#060;/SCRIPT&#062;<BR>This sets the focus of the form (name="formname") to the input textbox (name="fieldname").<BR>

Posting Permissions

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