jquery ajax post does not work in IE6
$('#add-asset-form').submit(function(){
//if (validate_asset_form()) {
$.ajax({
type: 'POST',
url: 'wp-content/themes/t开发者_StackOverflowvmarketing/assetform/ajax-req.php',
cache: false,
data: $('#add-asset-form').serialize(),
error: function(){ alert('error'); },
success: function(data){
alert('sucessful');
$("#ajax-res").html(data);
$('#edit-id').val('');
$('#add-asset-form')[0].reset();
}
});
//}
return false;
});
Why does this not work in IE6? It works fine in FF. When I run this in IE6 I get the "error" alert. Can someone please guide me in the right direction.
Thanks
Change
error: function(){ alert('error'); },
to
error: function(request, textStatus, errorThrown){
alert(textStatus);
alert(errorThrown);
alert('test');
alert(request.status);
alert(request.responseText);
},
and see what you get
精彩评论