Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can't get parsing XML to work in JavaScript

 
Jeroen Berens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you setting the content type twice?

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

Eric
 
Jeroen Berens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I Alert, it says: [undefined]
 
Jeroen Berens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry it says Object element but when I say
it says it's undefined.. damnit
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Where is the postOverview object created? It is not in the this function.
 
Jeroen Berens
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whole java script:


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic