I have the following AJAX function:
function ajaxDesignerBrandInfo() { var D = wrapFormValues('#designer-brand-form'); var recursiveEncoded = $.param(D); /* $.post("/api/designer_brand/", { data : recursiveEncoded }, function(data) { var results = $.parseJSON(data); window.location = "/register/designer-product/"; });*/ $.ajax( { type: "POST", url: "/api/designer_brand/", data : { data : recursiveEncoded }, success: function(data) { console.log(data); setTimeout(function() { window.location = "/register/designer-product/"; },0); }, error: function (xhr, ajaxOptions, thrownError ){ alert(xhr.status); alert(thrownError); } }); return false; } And the corresponding form
<form id="designer-brand-form" name="form" method="post" action="" onSubmit="ajaxDesignerBrandInfo(); return false;"> .... </form> The submission works great on Chrome, Safari and FireFox, moving me to
/register/designer-product/
Correctly, but in IE9, the submissions seems to
Never make it to the server
clear the form and redirect back to the current page i am on (in which this form exists).
I can confirm via FireFox there are no javascript errors causing this to fail. And sometimes it actually works, but I cannot seem to always reproduce this error in the same way
Someone Please explain WTF is going on?
Thanks