Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getElementsByTagName

Status
Not open for further replies.

maclav

Programmer
Oct 29, 2007
28
GB
Hi
I am very new to ajax. I am a web developer that has inherited some code and new to ass some new functionality.
I am trying to use this function and have read a lot but cant wrap my head round it :
responseXML.getElementsByTagName
Here is the chunk of code I have written. Could you look at it and see if there is anything glaringly obvious in these.
Code:
							if (responseXML.getElementsByTagName('CcErrCode')[0].firstChild.data != "1") 
							{
								alert(responseXML.getElementsByTagName('text')[0].firstChild.data);
							}
I would appreciate any help or links to information regarding this that is understandable to java noob.
Thanks
Ian
 
This code retrieves in responseXML Dom Element the first ("[0]") element whose tagname is equal to "CcErrCode".
If the content of its first child node is equals to "1", it displays a message box (alert) whose message is the content of first child of first node with "text" tagName.

Water is not bad as long as it remains outside human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top