i hava created the ajax XMLHttpRequest request for getting the data dyanmically ,
here is the code
var XMLHttpReq;
function createXMLHttpRequest() { if (window.XMLHttpRequest) { XMLHttpReq = new XMLHttpRequest(); } else { if (window.ActiveXObject) { try { if(XMLHttpReq==null) XMLHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
if(XMLHttpReq==null)
XMLHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) {
}
}
}
}
}
this is the method which sends the request
function personList(person) {
createXMLHttpRequest();
var url="query?option=person&userName="+person.innerHTML;
XMLHttpReq.open("GET", url, true);
XMLHttpReq.onreadystatechange =personListResponse;
XMLHttpReq.send(null);
}
function personListResponse() {
if (XMLHttpReq.readyState == 4) {
if (XMLHttpReq.status == 200) {
var xml=XMLHttpReq.responseXML;
}
}
}
the request is sent to the servlet only for the first time,when i try for the second the request is not sent ,instead am getting the previous response what i got earlier