I use the following code to POST data:
$.post("http://domain/page.aspx", postdata);
UPDATED:
The following code doesn’t work:
$.post("http://domain/page.aspx", postdata, function(data){alert(data);});
How to get server response as string?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I expect you’re running up against the Same Origin Policy, which prevents ajax posts cross-origin unless CORS is supported and configured on the server to allow requests from your page’s origin (and the browser being used supports it).