javascript - how to write/update the data in html page depeding upon the json response in ajax jquery -


i working javascript jquery. m sending request url getting json response , want json response should displayed in html page format may in table or smoother format.then how can that.and want update data in html page depending upon json response dynamically.so how can that.and working phonegap technology should use server side ?

$.ajax({     type: "get",     url: "url",     data: null,     contenttype: "application/json; charset=utf-8",     success: function(data) {         alert("success");     } }, error: function(jqxhr, exception) {     if (jqxhr.status === 0) {         alert('not connect.\n verify network.');     } else if (exception === 'timeout') {         alert('time out error.');     } else if (exception === 'abort') {         alert('ajax request aborted.');     } else {         alert('uncaught error.\n' + jqxhr.responsetext);     } } });   

replace code

$.ajax({     type: "get",     url: "url",     data: null,     contenttype: "application/json; charset=utf-8",     success: function(data) {         alert("success");     },     error: function(jqxhr, exception) {         if (jqxhr.status === 0) {             alert('not connect.\n verify network.');         } else if (exception === 'timeout') {             alert('time out error.');         } else if (exception === 'abort') {             alert('ajax request aborted.');         } else {             alert('uncaught error.\n' + jqxhr.responsetext);         }     } }); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -