I'm used to using Ajax, however, the method I use usually requires that I request a php file that queries my database. The thing is that I need to call the php document this way: http.open("GET", url, true); I would rather use a "post" method instead of the "get" method - makes it easier to pass data to the target page. Is there a way to do so using Ajax? Please help.
Hi, You can use a get query quite easily with ajax, something like this. var query = "?getvar=" + $get_var; ajaxRequest.open("GET", "script.php" + query, true); ajaxRequest.send(null); Code (markup): Of course change the settings to match yours but it should now let you see how it works. Glen
http.open("POST", url, true); http.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); http.onreadystatechange = your_function; http.send('foo=bar&var2=x&etc=so on'); Code (markup):