Skip to content

AIoT-Consulting/AJAX_Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Having issues with my XMLHttpRequest.

Description:

The webpage is actually working well, and the numers are updating correctly as per the frequency of the timeout, but I'm getting an error on the development console which I do not understand:

Uncaught TypeError: Cannot read properties of null (reading 'getElementsByTagName') at XMLHttpRequest.response ((index):49:26) at process ((index):68:11) at :1:1

I've reviewed my html & script but do not understand what I'm doing wrong. The actual HTML file is also included here, it's called: HTTPXMLRequest_Test.html

See images bellow.

  • The first image shows the error appearing in the console
  • The second image shows the location (line 49 of the index file) where the error is occuring.
  • The third and fourth images show the content of two consective XML files (dont worry about the numbers on the webpage being differnt as I've paused debug).

Any help in understanding why I'm getting this error would really be appreciated...

PS: I'm using an "OR" rather then an "AND" in my if statement *** if(xhr.readyState === 0 || xhr.readyState === 4) *** as I have a dedicated server firing the XML file every second, so I want to run this function either way ("UNSENT" or when "DONE")

Error1

Error1

Error1

Error1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages