internet explorer - IE AJAX Cross-Browser Issue -


i have 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 corresponding form

<form id="designer-brand-form" name="form" method="post" action="" onsubmit="ajaxdesignerbrandinfo(); return false;">  .... </form> 

the submission works great on chrome, safari , firefox, moving me

/register/designer-product/

correctly, in ie9, submissions seems to

  1. never make server

  2. clear form , redirect current page on (in form exists).

i can confirm via firefox there no javascript errors causing fail. , works, cannot seem reproduce error in same way

someone please explain wtf going on?

thanks

i believe issue ie silently throwing javascript error. because firefox doesn't throw js error 1 doesn't mean ie doesn't. check js errors in ie (see this link or this one). find error , you'll find solution.

also, try fiddler, standalone windows tool acts proxy server , tell ajax traffic looks like.

your specific problem may console.log call. firebug thing (that chrome supports). ie not, think, unless take steps add it. see: what happened console.log in ie8?


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -