Jquery with json response failed
enter code here
function test(action,action1,page){
alert("in test");
$.getJSON("./paging.do?action="+escape(action)+"&p="+escape(action1)+"&str="+escape(page),
function(pageListHolder){
alert("j"+pageListHolder.length);
var options = '';
for (var i = 0; i < pageListHolder.length; i++) {
options += '<option value="' + pageListHolder.key + '">' + pageListHolder.data + '</option>';
}
$("#selectCol").empty();
$("#selectCol").html(options);
});
}
Above function is called when I click on an element,the above function able to call server.But i didn't see any respons开发者_运维百科e data.Could you Please check and let me know.
Thanks in advance. Raju
You should install firebug and try to see what ajax calls and the response on the net tab.
Your Json might be malformed or the server might have returned an error code like 500 or 404.
精彩评论