Dear sir, I have created controls dynamically and the controls are inside the table and the table inside the div.Im getting error in mozilla browser.. The sample html generated code is shown below <div id=divall runat="server">
sdfssdf
<select id=dd1> <option value="1">sdfsd</option> <option value="1">sdfsd</option> <option value="1">sdfsd</option> <option value="1">sdfsd</option> </select>
sdfssdf
<select id=dd1> <option value="1">sdfsd</option> <option value="1">sdfsd</option> <option value="1">sdfsd</option> <option value="1">sdfsd</option> </select>
sdfssdf
<select id=dd1> <option value="1">sdfsd</option> <option value="1">sdfsd</option> <option value="1">sdfsd</option> <option value="1">sdfsd</option> </select>
I access the value as below var divall = document.getElementById('divall'); //for getting all the controls inside the div var allcntr = divall.childNodes[0].childNodes[0].childNodes; for(var i=0;i<allcntr.length;i++)> { //for getting all the dropdownlist's value inside the table var cmball=divall.childNodes[0].childNodes[0].childNodes[i].getElementsByTagName('OPTION'); for(var j=0;j<cmball.length;j++)> { if(cmball[j].selected) { //some code } } } // divall.childNodes[0].childNodes[0].childNodes; The above code is working 5n in IE but not in mozilla. Is there any common code(compatible to all browsers mainly IE & Mozilla) to access the childnodes? Thanx for your help in advance..
T.Balaji