B
Bostonasian
I am trying to append options to dropdown in parent window from option
items in child window.
In parent window, I have following code:
<script language="javascript">
function AddItem2DropDown(item){
exists = false;
for(d=0;d<drpDwn.length;d++){
if(drpDwn.options[d].value == item.value)
exists = true;
}
if(exists == false)
drpDwn.options[drpDwn.length] = item;
}
</script>
Then in child window, I have following code:
<script language="javascript">
function AddItems(child){
for(i=0;i<child.length;i++){
if(child.options.selected == true)
window.opener.AddItem2DropDown(child.options);
}
}
</script>
It works in Firefox, but not in IE6. Has anyone got this working in
IE6?
items in child window.
In parent window, I have following code:
<script language="javascript">
function AddItem2DropDown(item){
exists = false;
for(d=0;d<drpDwn.length;d++){
if(drpDwn.options[d].value == item.value)
exists = true;
}
if(exists == false)
drpDwn.options[drpDwn.length] = item;
}
</script>
Then in child window, I have following code:
<script language="javascript">
function AddItems(child){
for(i=0;i<child.length;i++){
if(child.options.selected == true)
window.opener.AddItem2DropDown(child.options);
}
}
</script>
It works in Firefox, but not in IE6. Has anyone got this working in
IE6?