Javascript: ios 8 show json content to DOM instead of run callback on ajax request -



have ajax request, runs on android , ios 10, on ios 8/9, puts json string data dom , nothing else. there json string showed, no dom head or other contents. don't know why strange error happens.

ajax request:

var xmlhttp = new xmlhttprequest(); xmlhttp.onreadystatechange = function () {     if (xmlhttp.readystate == 4 && xmlhttp.status == 200) {         var data = json.parse(xmlhttp.responsetext.trim());         if (data.status == 1) {             console.log("ok");             location.href = data.ref;         } else {             app.emptymessages();             (var = 0; < data.messages.length; i++) {                 app.putmessages(data.status, data.messages[i]);             }         }     } }; xmlhttp.open("post", "/users/register"); xmlhttp.setrequestheader("content-type", "application/x-www-form-urlencoded"); xmlhttp.send(app.urlencodeparams(form)); 


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -