jquery - Internet Explorer 10 Does Not Sent Ajax Post Data -
ok, researched several hours , i'm still stumped.
internet explorer ten submit ajax requests using jquery, not include post data.
here code:
var ajaxdata = "firstname="+encodeuricomponent($('#firstname').val()); //get data account form ajaxdata += "&lastname="+encodeuricomponent($('#lastname').val()); ajaxdata += "&emailaddress="+encodeuricomponent($('#emailaddress').val()); ajaxdata += "&cat_custom_246311="+encodeuricomponent(listdata); var config = { async: false, type: "post", url: "/formprocessv2.aspx?webformid=44714&oid={module_oid}&otype={module_otype}&eid={module_eid}&cid={module_cid}&json=1", datatype: "json", // text"json", processdata: false, data: ajaxdata, timeout: 70000, cache: false, }; $.ajax(config) .done(function(data, event) { if(data.formprocessv2response.success == true){ //success field in bc response alert("the list submitted sucessfully."); console.log(xhr); } else{ alert("an error occurred , list not submitted."); } }) .fail(function(msg,event) { alert("an error occurred , list not submitted."); });
every other browser (safari, opera, chrome, firefox, ie9) allow work, code fails in ie 10. looking @ using fiddler shows headers same between other browsers , ie 10, ie 10's request headers have content length value of 0, , there no body text.
in reference of other problems people have been having, no, not have download manager style plugins. plugins default. here photo of plugins have record.
var xmlhttp; if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { document.getelementbyid("mydiv").innerhtml=xmlhttp.responsetext; } } xmlhttp.open("post",config.url,true); xmlhttp.setrequestheader("content-type","application/x-www-form-urlencoded"); xmlhttp.send(config.data); }
this dummy text w3schools raw request, own data.
here example of value data given internet explorer (using dev tools)
firstname=joe&lastname=spacely&emailaddress=tester%40test.com&cat_custom_246311=test%3dtest
i using internet explorer 10.0.9200.16519 on windows 8 x64 w/media pack.
does internet explorer not support @ all?
any appreciated. oh, , please refrain telling me how bad ie is. know it, web developers still have deal it.
posting requested:
does have url having $_post data on there? perhaps if include information in variable , have static url ull have more success.
btw, might consider using {key:value} pairs, since building query string far more difficult maintain.
Comments
Post a Comment