Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Location
    Northbrook, IL
    Posts
    394
    Thanks
    8
    Thanked 6 Times in 6 Posts

    Question AJAX response woes : (

    Code:
    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:

    Code:
    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
    Last edited by Leeoniya; 06-06-2007 at 11:56 AM.

  • #2
    Regular Coder
    Join Date
    May 2007
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am not a soothsayer, can you please show us more code?
    Forum for webmasters and developers
    http://www.htmlfrenzy.com
    Are you an IT expert? Join our Reward system
    www.htmlfrenzy.com/reward-system.php


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •