Update the Internal Representation of the Page With the New Data
function parseMessages() {
    if (!names) names = document.getElementById("names");
    clearTable();
    var employees = req.responseXML.getElementsByTagName("employees")[0];
    if (employees.childNodes.length > 0) {
        var autorow = document.getElementById("menu-popup");
        autorow.style.visibility = "visible";
    }
    for (loop = 0; loop < employees.childNodes.length; loop++) {
        var employee = employees.childNodes[loop];
        var firstName = employee.getElementsByTagName("firstName")[0];
        var lastName = employee.getElementsByTagName("lastName")[0];
        var employeeId = employee.getElementsByTagName("id")[0];
        appendEmployee(firstName.childNodes[0].nodeValue,lastName.childNodes[0].nodeValue,
                       employeeId.childNodes[0].nodeValue);
    }
}
 
 
 
Copyright 1994-2006 Sun Microsystems, Inc. Close