javascript - JSON Stringify missing in QA environment but not locally -


related (but not duplicate): is json.stringify() supported ie 8?

also related (but different ie version): json object undefined in internet explorer 8

i working qa test feature; feature works on system, on system he's getting 'json undefined` exception in developer console:

enter image description here

i, however, no exceptions @ in mine.

both of running same code in internet explorer 11 in compatibility view (although we're using different versions of ie11, he's using 11.0.9600.18617 , i'm using 11.953.14393.0).

"about" dialog computer:

enter image description here

"about" dialog mine:

enter image description here

and here's relevant code:

function getnewlist() {    jquery.ajax({      url: "myaspxpage.aspx/getserviceinformation",      type: 'post',      // apparently complains line him      data: json.stringify({        "scheduledate": jquery('#atextbox').val()      }),      datatype: 'json',      processdata: false,      contenttype: 'application/json; charset=utf-8',      // todo: error?      complete: function(response, status) {        if (status == 'success') {          // presumably, problem          var jsonparsed = json.parse(response.responsetext)            // dropdown menu          var dropdown = document.getelementbyid('mydropdown')            // remove of existing options          var length = dropdown.options.length          (i = 0; < length; i++) {            dropdown.remove(0)          }            // add of current objects          jsonparsed.d.each(function(element) {            var option = document.createelement('option')            option.value = element.servicetypeid;            option.text = element.servicetypename;              dropdown.add(option)          })            // re-add --select--, if there other options. otherwise leave empty.          if (jsonparsed.d.length > 0) {            var option = document.createelement('option')            option.value = 0            option.text = '--select--'            dropdown.add(option)              dropdown.disabled = false;          } else {            dropdown.disabled = true          }        }      }    })  }

on related note, replace updatepanel was having trouble getting working.

does know causing this, , how might fix it?

you may want include json polyfill in app older versions of ie. had 1 running in app runs in ie 5 mode. convince team upgrade old version of i.e

here 1 json 3 http://bestiejs.github.com/json3

you can read here https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/json


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -