JSON hangs javascript, but only specific ones -


Being a special being here.

A piece of JavaScript that asks for a bunch of data.

function that asks for this information:

  onRegionClick: function (e, code) {var mapKeyUrl = "/ GenMap / getcountry / jsonchk" $ .getJSON ( mapKeyUrl, {regsel: regsel, countryiso: code}) .done (function (Deshdeta) {document.getElementById ( "maptext"). = "a" countrydata.countryname;})}   < P> If I click on the map, it is hanging, so tried to change the JSON request to another function, which gives less data, but the same format. works like a charm. If I go to the same request in the web browser, Jsonchk returns: <">" Country ": [{" ccode ":" ID "}, {" cname ":" Indonesia "}, {" exturl ":" N / A "}, {" Impdate ":" N / A "}, {" lupdate ":" 29/09/14 "}, {" impnote ": null}]}   

However, if I stop working so I pressed Indonesia, if I have any other function would return a different data, called countln:

  { "class": "genmap.Country "," id ": 101," countryiso ":" ID "," Country name ":" Indonesia "," Regstats ": [{" class ":" genmap.Regstat "," id ": 46}]}    

I have no clue why this works (well, not hanging, still can not read data), but this is because if someone has similar problems :)

  var mapKeyUrl = "/ Jenmark / Getcountry / jsonchk"; Var Mapakeyuarel = "/ Jenmark / Getkantry / Jesnchuk" $ .getJSON (Nkshakeyuuarel {negative: "$ {minus}" , Countrymen: code}) .one (function (contadata) {warning (contdata) contdata = contdata.country warning (Contdata) document.getEleme NtById ("maptext"). InnerHTML = "I am an abwrock" + code + contdata.exturl;})    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -