Hi, I cannot find a solution for that, I need to override a previous setted submit event handler. In my example, I have a iframe page, with their own submit (which can have validation errors, and return false). So, I'm need to do:
$('<iframe></iframe>')
.load(function() {
content = $(this).contents()
form = content.find('form')
previous_form_submit = .... //This is my question
form.unbind("submit")
form.submit(function() {
var valid = previous_form_submit()
if (valid) {
$.post(form.attr('action'), form.serialize(), function(data) {
//do something
})
})
})
Edit: To be more clearer, the problem is override the event, but without loosing previous handler with validation.
Edit2: I'm using jquery 1.3.2
I'm going to another kind of solution, but I felt curious about how can do that.
Thanks.