Hi all,
Whenever you send json data on ajax you should use encodeURIComponent() method to encode json data other wise special chars in json data like '&,?' may disturbs the url data posting to the server.
i.e
$.ajax({
url: 'ajax/test-page.php',
data: 'usr_data='+encodeURIComponent(frmdata)
});
Whenever you send json data on ajax you should use encodeURIComponent() method to encode json data other wise special chars in json data like '&,?' may disturbs the url data posting to the server.
i.e
$.ajax({
url: 'ajax/test-page.php',
data: 'usr_data='+encodeURIComponent(frmdata)
});
No comments:
Post a Comment