Results 1 to 3 of 3

Thread: onSubmit

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 2002
    Posts
    333

    onSubmit

    When specifying the properties of a form what is the difference between:

    Code:
    <FORM action="rar.asp" onSubmit="function()">
      <INPUT type="hidden" value="foo">
    </FORM>
    
    and 
    
    <FORM action="rar.asp" onSubmit="return function()">
      <INPUT type="hidden" value="foo">
    </FORM>
    (onSubmit bit....)

    Cheers!

  2. #2
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    if you return false within the function your form will not be submitted, so using return gives you the option not to send the form. exp if a field hasnt beenb filled

  3. #3

    Thread Starter
    Hyperactive Member chuddy's Avatar
    Join Date
    Oct 2002
    Posts
    333
    great thanks! very useful

Posting Permissions

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



Click Here to Expand Forum to Full Width