|
I am having problems checking if a node exists.
This works if the node does exist, craps out if it doesn't:
if(transport.responseXML.getElementsByTagName('Des cription')[0].firstChild)
This returns undefined regardless if it exists or not:
if(transport.responseXML.getElementsByTagName('Des cription').firstChild)
This returns an Object HTMLCollection regardless if it exists or not:
if(transport.responseXML.getElementsByTagName('Des cription'))
I'm sure it's a simple solution. Any hints?
Thanks,
Cory
|