[jQuery] Re: How to bind a submit form action

2007-07-09 Thread Mike Alsup
FYI, The latest version of the form plugin now does this for you automatically. You can call ajaxForm numerous times without having to worry about unbinding events. Mike After you replace the public element with the new input you need to rewire the form so that the new button is properly

[jQuery] Re: How to bind a submit form action

2007-07-02 Thread Mike Alsup
Massimiliano, After you replace the public element with the new input you need to rewire the form so that the new button is properly recognized. But you don't want double event handlers, so you need to first fully unwire it. Ideally you'd put this code in its own function, but the idea is

[jQuery] Re: How to bind a submit form action

2007-07-02 Thread Massimiliano Marini
$(.public).after(input type=submit name=action value=Update class=update).remove(); $('#formPub').unbind('submit').find(':submit,input:image').unbind ('click'); $('#formPub').ajaxForm({ target: '#response', beforeSubmit: function() { /* whatever */ }, success: function(){