Jquery ajax result not working on chrome -
i have problem jquery ajax on chrome. ajax echo result this:
1||result goes here
here ajax script:
$("#load_cards").click(function() { $("#load_cards").fadeout('fast'); var form_data = { query: 'cardpack', page: page, pack: pack }; $.ajax({ type: "post", url: 'ajax.php', data: form_data, success: function(response) { response_d = response.split("||"); response_message = parseint(response_d[0]); response_html = response_d[1]; if (response_message == 1) { hist = $("#card_pack_list").html(); $("#card_pack_list").html(hist+response_html); page = page+1; } else { } $("#load_cards").fadein('fast'); } }); });
the problem firefox , opera recognizes response_message 1 chrome not. why , how can overcome it? running script on xampp virtual server.
are sure chrome goes in "success" callback ?
if not, try add "complete" , "error" callback ajax call , see happened :
success: function(response) { console.log("success callback"); ... }, error: function(jqxhr, textstatus, errorthrown) { console.log("error callback : " + textstatus); }, complete: function(jqxhr, textstatus) { console.log("complete callback : " + textstatus); }
Comments
Post a Comment