Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Generating table from a jsp

Status
Not open for further replies.

Sethington

Technical User
May 16, 2006
34
US
What I want to do is use ajax to return a table that was generated using a jsp. I am getting the table back and it is displaying on the page but it is returning all of the tags with it. IE. <table><tr><td></td></tr></table>

My parsing javascript method looks like this:

Code:
function parseResults() {
	var responseDiv = document.getElementById("serverResponse");
	if(responseDiv.hasChildNodes()) {
		responseDiv.removeChild(responseDiv.childNodes[0]);
	}
	var responseText = document.createTextNode(xmlHttp.responseText);
	responseDiv.appendChild(responseText);
}

Please advise

Thank You

 
Solved my own problem with:

Code:
function parseResults() {
	var response = xmlHttp.responseText;
	document.getElementById('serverResponse').innerHTML = response;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top