Quote:
quote:Originally posted by suersh79
Any suggestions!!!!!!
|
Yes, if you want a quick response pay for professional help.
You'd be better off using Xpath
Code:
xmlDoc.setProperty("SelectionLanguage", "XPath");
var empName = comboBox.options[comboBox.selectedIndex].value;
var sXPath = "/payslip/employee[name = '" + empName + "']";
var oEmployee = xmlObj.selectSingleNode(sXPath);
This assumes you're using Microsoft's XMLHttp, version 3.0 or greater.
If you have to use getElementsByTagName it's more difficult as you must select all employee elements:
Code:
var colEmployees = xmlObj.getElementsByTagName("employee");
Then loop through them all and test if .firstChild.text = empName.
--
Joe (
Microsoft MVP - XML)