Appending option items in dropdown in parent window from dropdown in Child window in IE

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top