I couldn't think of a better title, but here is the explanation:
I am making an ajax request that looks like this:
...
xmlhttp.send("data1=" + $data);
...
document.getElementById("data1display").innerHTML= xmlhttp.responseText;
...
Now the page has developed and I want to send another variable, data2 to the same php page for processing.
I realise I can add data to xmlhttp.send like "data1=" + $data + "data2=" + $data2
But! How do I split the response to update two separate elements? (data1display and data2display).
the code that builds the response:
if ( isset( $_POST["data1"] ) )
die($object->function()); //returns html to fill the specified element.