Bronzato
Bronzato

Reputation: 9332

Stopping form submitting interception

I have the code below:

$('form', dialog).submit(function () {
    ...

Then every form submitted is intercepted.

My question: how can I stop this interception?

Thanks.

Upvotes: 0

Views: 82

Answers (4)

Stan
Stan

Reputation: 84

You need to add return false; in the end of your function like this:

function(){ 
    /* Some code */

    return false;
}

Upvotes: 0

Mohamed Nagy
Mohamed Nagy

Reputation: 1058

you can use this:

$('form', dialog).submit(function (e) {
e.preventDefault();
}

event.preventDefault() If this method is called, the default action of the event will not be triggered.

or you can simply use:

 $('form', dialog).submit(function (e) {
    //your code here 
    return false;
   }

Upvotes: 0

blake305
blake305

Reputation: 2236

According to the docs, try adding return true; at the end of your function.

Upvotes: 0

James Montagne
James Montagne

Reputation: 78650

unbind should do the trick.

$('form', dialog).unbind("submit");

Upvotes: 1

Related Questions