I’m using this following jquery code to insert the responsetext in the div.
$("#div").load('page.php?val='+myvalue)
Is it possible to get the responsetext into a javascript variable instead of applying it to a div.?
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.
You would need to replace
.load()with.get()for instance.One word of caution: the
dataparameter in the above snippet does not necesarilly shim theresponseTextproperty from the underlaying XHR object, but it’ll contain whatever the request returned. If you need direct access to that, you can call it like