tags:

views:

20

answers:

1
 $('#add-asset-form').submit(function(){
    //if (validate_asset_form()) {
    $.ajax({ 
             type: 'POST',
             url: 'wp-content/themes/tvmarketing/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

A: 

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

cjavapro
Following error in IE6 This method cannot be called until the send method has been called. Line 15: character 7
vick
I edited the order of the alerts. Please copy it again and see what happends.
cjavapro