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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JS Not working consistently in Browsers

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
Ive a piece of Javascript that I am calling to pull data back from a web service.

In I.E 7 the following code pulls back a table (created via a webservice) and displays the table html as Text within a div on my page.

In Firefox it does nothing.

Code:
var serverResponse = document.createElement("div");
serverResponse.innerHTML = xmlHttp.responseText
             
document.getElementById('dvResults').innerText = xmlHttp.responseText;

The following code will draw nothing in IE7 but will draw the actual table in firefox
Code:
var serverResponse = document.createElement("div");
serverResponse.innerHTML = xmlHttp.responseText
             
document.getElementById('dvResults').innerHTML = xmlHttp.responseText;

So, what should I do to take the actual html fragment out of the xmlHTTP object and render it correclty within a div


Thanks
K
 
Ok, I fixed it, the real problem was being masked by another error. Moving the javascript to the bottom of the file cured that and I was able to diagnose the rest through.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top