F
Flyzone
I'm trying to add an option to a select from a new window opened as
popup.
From the children window i use:
i =
window.opener.parent.document.getElementById('opt_name').options.length;
window.opener.parent.document.getElemenyById('opt_name').options=new
Option('AAAA','AAAA');
and in the parent window i have declared the select as:
<select name="opt_name[]" id="opt_name" multiple="multiple" size="10">
It works perfectly on FF, on IE 7 i get the error:
"Object doesn't support this property or method".
The strange is that calling the function from the same page works, but
on the children is not passed,
i could just change the value/name using the .value or .innerHTML, but
not adding a new option.
Someone could help me? Thanks in advance.
popup.
From the children window i use:
i =
window.opener.parent.document.getElementById('opt_name').options.length;
window.opener.parent.document.getElemenyById('opt_name').options=new
Option('AAAA','AAAA');
and in the parent window i have declared the select as:
<select name="opt_name[]" id="opt_name" multiple="multiple" size="10">
It works perfectly on FF, on IE 7 i get the error:
"Object doesn't support this property or method".
The strange is that calling the function from the same page works, but
on the children is not passed,
i could just change the value/name using the .value or .innerHTML, but
not adding a new option.
Someone could help me? Thanks in advance.