Hi i’m trying to make a website with ajax. This is what i have:
[code=php]
//javascript
//AJAX
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest) {
XMLHttpRequestObject = new XMLHttpRequest();
} else if (window.ActiveXObject) {
XMLHttpRequestObject = new ActiveXObject(“Microsoft.XMLHTTP”);
}
function getData(dataSource, divID){
if(XMLHttpRequestObject) {
var obj = document.getElementById(divID);
XMLHttpRequestObject.open(“GET”, dataSource);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 &&
XMLHttpRequestObject.status == 200) {
obj.innerHTML = XMLHttpRequestObject.responseText;
}
}
XMLHttpRequestObject.send(null);
}
}
when i call this:
[code=php]
getData(‘pages/menu.php’,’mainMenu’);
the information that is output at the php page menu.php is shown in mijn DIV mainMenu works great….but what to do when i want to send information to multiple DIV’s so the file menu.php sends one part of information to my DIV mainMenu and another part of information to the DIV subMenu is this possible????
thanks in advance!!
Zeb