jnroche Posted October 31, 2006 Share Posted October 31, 2006 Hi Guys!Im trying to pass a return value from PHP file to a javascript source code and the javascript source code would look like this:in AJAX: ...xmlhttprequest('reasons', '../templates/Emailto.php');I want Emailto.php to return something and I know I can catch this value from the ajax responseText property, so with this is it correct to say:...document.getElementById('spanIDhere').innerHTML = xmlhttp.responseText; if (xmlhttp.responseText == "something") {process here;}...i tried this to no avail. How can i let javascript/ajax know what the responseText is to process it further within the same file if i cant catch responseText as a javascript/ajax ordinary variable? ????????? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now