wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Can't get parsing XML to work in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Can Watch "Can New topic
Author

Can't get parsing XML to work in JavaScript

Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
Hey, I have the following JavaScript that tries to parse some XML which was send by a Servlet:

Clientside Javascript:



Servlet:


However when my javascript comes to the point where it runs:


it fails. My internetexplorer displays error message: Object required , line 124 , char 9 (which is .childNodes)

I don't know what to do, can you help me?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Why are you setting the content type twice?

If you alert/console.log posts, what does it say?

Eric
Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
When I Alert, it says: [undefined]
Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
Sorry it says Object element but when I say
it says it's undefined.. damnit
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187


Where is the postOverview object created? It is not in the this function.
Jeroen Berens
Greenhorn

Joined: Feb 17, 2011
Posts: 4
whole java script:


 
 
subject: Can't get parsing XML to work in JavaScript
 
Similar Threads
charset and pageEncoding in jsp
showing load not a function
AJAX ResponseXML not working
AJAX script isn't parsing XML response from servlet
XML string parsing in javascript