...

View Full Version : AJAX response woes : (



Leeoniya
06-06-2007, 11:53 AM
for (i = 0; i < htmlArray.length; i++) {
if (document.getElementById(idArray[i]).innerHTML != "") {
document.getElementById(idArray[i]).innerHTML += htmlArray[i];
}
else {
document.getElementById(idArray[i]).innerHTML = htmlArray[i];
}
}

i get the following error despite the fact that it fills the innerHTML correctly, which halts the JS and prevents the rest of the functions from working:


document.getElementById(idArray[i]) has no properties
onreadystatechange() ajax.js (line 183)

[Break on this error]
if (document.getElementById(idArray[i]).innerHTML != "") { ajax.js (line 183)

any ideas?
maybe i need to set a timer or something? i don't understand why i get an error if the target element fills correctly.

Leon

smalldog
06-06-2007, 02:27 PM
I am not a soothsayer, can you please show us more code? :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum