66
rated 0 times
[
73]
[
7]
/ answers: 1 / hits: 30314
/ 10 Years ago, fri, january 30, 2015, 12:00:00
var JSONonj = {name: James,age:25};
var data = This data i would like to retrieve and print in the main.html page after success call in ajax.;
$.ajax({
url: /user,
type: POST,
data: JSONobj,
dataType: json,
success: function() {
window.location.href = main.html;
},
contentType: application/json
});
Here is the deal. After success i want to redirect to main.html and when I get there, I would like to retrieve and print data variable there.
The redirection works fine. But I can not receive the data there.
More From » ajax