Forums

This topic is locked

javascript Help

Posted 10 Jul 2007 16:49:58
1
has voted
10 Jul 2007 16:49:58 sridhar jayaraj posted:
Hi,

i have tried to load the select box options from Child window, it's working fine in Firefox and not supported by IE. im not able to create a new option in the parent window. help me to find the error in the following code


Its my Child window codeing.


if(typeof(scriptpracticebundle[i])!="undefined"
{
var xcomboprac = window.opener.document.getElementById("pracid";
for(y=0;y<xcomboprac.length;y++)
{

xcomboprac.options[y]=null;
y=0;
}
var newOpt1 = new Option("All", "All";
xcomboprac.options[0] = newOpt1;
var practcedetails = scriptpracticebundle[i];
var eachpractice;
for(p=0;p<practcedetails.length;p++)
{
eachpractice = practcedetails[p];
newOpt1 = new Option(eachpractice[1], eachpractice[0]);
xcomboprac.options[p+1] = newOpt1;
}

xcomboprac.selectedIndex = 0;


Thank you

Sridhar.J

Reply to this topic