I want to send json data via url to the next html page. I tested it with an emulator, since I work in a mobile application, so the URL cannot be redirected to the next page, and at the moment it is crashing, what is the reason for this. How can I make it out on the next page. Am I new to jquery any idea? my json data contains the result of two different sql queries in an array
$.ajax({ type : "POST", datatype : "json", url : "http://Localhost/phpBB3/check_pass.php?username="+ username + "&password="+ password+"&f=68", success: function(data){ alert(data); window.location.href="source/testmenu.html?varid=" + data +"&username=" + username +"&password=" + password; } });
This is the code on the next page.
$(document).ready(function GetUrlValue(VarSearch){ var SearchString = window.location.search.substring(1); var arr = SearchString.split('&'); console.log(arr);
json javascript jquery html
Hrudaya palwe
source share