views:

172

answers:

1

Hi, My ajaxForm request is not working properly in Safari and Chrome. Instead of getting the response from php file it opens it as a new page. (Works fine in FF, IE, Opera):

$('#my_form').ajaxForm({
    success: finished
}); 
    function finished(responseText, statusText)  {
...
}

Thanks for your help!

A: 

in the same plugin can find this example:

$(document).ready(function() {
    $('#myForm').bind('submit', function() {
        $(this).ajaxSubmit({
            target: '#output'
        });
        return false; // <-- important!
    });
});

You can do this in the same form in the onSubmit event:

<form ... onSubmit="return false;">
andres descalzo