Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Intercept Form Submit
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Beau Hartshorne  
View profile  
 More options Aug 3 2007, 3:13 pm
From: Beau Hartshorne <hartsho...@gmail.com>
Date: Fri, 3 Aug 2007 12:13:10 -0700
Local: Fri, Aug 3 2007 3:13 pm
Subject: Re: [mochikit] Re: Intercept Form Submit
On 27-Jul-07, at 9:45 AM, Karl Guertin wrote:

>> What is the most efficient way to intercept a form submit event?
>> "onsubmit" in the form tag?  "onclick" on the submit button?  Make  
>> use
>> of the connect function?  Something else?  Additionally, I would
>> prefer that this method fail in a way that allowed for a normal  
>> submit
>> to occur if JavaScript were disabled.

> connect(formElement,'onsubmit',function(e){
>  console.log(e); //see what's in the Signal event if you don't know
>  return false; //prevent form submission
> });

return false; doesn't do anything here, this should look like:

connect(formElement,'onsubmit',function(e){
     console.log(e); // see what's in the Signal event if you don't know
     e.stop(); // prevent form submission

});

Beau

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.