Hi,
I have a html form which is created by a cgi-script which sometimes
opens a popup window. This popup window reads it's content from a hidden
field in the openers form and writes it through document.write. The
content of this popup itself can also be small forms for example a
couple of radio button or textfields or things like that and every popup
has it's own "save" button,
When the user clicks "save" I have to read all the form elements in the
popup window and attach it to the window.opener form before submitting
that and closing the popup because I still need all the values from the
opener form plus the additional form fields from the popup.
I already tried looping through all the form elements and adding them
through appendChild to the opener. Problem is this crashes IE6 right
after it says "interface not supported", it works on Firefox 1.0 but it
must work on both browsers. I also tried to somehow clone the form
elements and then adding these clones to the parent, but you can't clone
form elements because you get a recursion too deep, because they are
linked to superclass objects, and therefore when you try to clone a form
object you end up in a loop. for example
document.forms. form.myfield.fo rm.myfield.form .myfield.form.. .. and so on
Does anyone have a solution how I can add these form values to my parent
window before submitting it?? Any ideas are welcome.
Marc