This is not really a php question, but anyway...
I'm trying to make multiple server request when pressing a link or button but I just don't get it to work. Making one request is no problem, that workes fine. This is parts or the code I use;
function sndReq(action) {
http.open('get', 'req.php?action='+action);
http.onreadystatechange = handleResponse;
http.send(null);
}
for making the request...
and the link:
a href="javascript:sndReq('one')" onclick="sndReq('two');"
The handleRequest simply places the requested page in a div.
What I want to do is making two requests based on a single action, and update two individual divs...
I also tried this (did not work either):
function sndReq(action, action2) {
http.open('get', 'req.php?action='+action);
http.onreadystatechange = handleResponse;
http.send(null);
http.open('get', 'req.php?action='+action2);
http.onreadystatechange = handleResponse;
http.send(null);
}
Any help is appreciated.