By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,701 Members | 1,782 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,701 IT Pros & Developers. It's quick & easy.

Select Update Pb

P: n/a
I've a pb only with IE!
A popup windows must be update an opener select form!!

In my popup i execute this :
addOption = new Option();
addOption.text = 'Aude';
addOption.value= 12;
newIndex = top.opener.document.test.dept.options.length;
opener.document.test.dept.options[newIndex] = addOption;

It's very good on Mozilla browser! but not in IE!!
On IE i've an error : 'Le serveur a généré une exception'

Have you some solution?
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
A popup windows must be update an opener select form!!
Must implies the absence of alternatives, there probably are
In my popup i execute this :
addOption = new Option(); <snip> newIndex = top.opener.document.test.dept.options.length;
opener.document.test.dept.options[newIndex] = addOption;


When you use - new Option() - in the pop-up it is the Option constructor
local to the pop-up that is used, and the resulting object is located in
memory belonging to the pop-up. Inserting that object into a document in
another window either will not be allowed, will tie-up the memory used
by the pop-up after it is closed, or will require that the browser
recognise what is going on an clone the original Option into a new one
local to the original window. IE takes the first choice.

You could try using the Option constructor form the original window as -
new opener.Option() - or you could make a function in the opener that
creates and adds the new Options locally, and call that from the pop-up
passing the string values needed for - text - and - value - as arguments
to that function. (the function in the opener option is the one I would
go with)

In the end, though, you are going to find that pop-ups are not the easy
answer for UI design that they first appear to be.

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.