So in AJAX I want to call a php page that will output a table in a particular order. Then I would simply want to pop that table output into a DIV. Is this possible with responseText or do I need to do something with XML? I am VERY noobish when it comes to AJAX. Thanks.
Hi, Try using this AJAX library: http://www.modernmethod.com/sajax/ You only need to include a PHP file at the top of your script and do a couple of function calls. You can use it to call a PHP function from your HTML page using Javascript. It simplifies things a lot. Thomas
Whether to use responseText or responseXml depends on the format of data that the server gives you. If it's in XML, then you'd use res ponseXml, otherwise use responseText. If the PHP script returns an HTML table, then just use responseText, and populate the div with innerHTML as suggested above. e.g.: This is the div: <div id="mydiv"></div> Your JavaScript should look something like this: document.getElementById("mydiv").innerHTML = yourXmlHttpObj.responseText; Otherwise if it was in XML, then you'd need to play around a bit with DOM.