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
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
$(.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(){
3 matches
Mail list logo