Click to See Complete Forum and Search --> : Duplicate/Copy a dropdown list.


Shampie
09-03-2003, 09:13 PM
Scope:
A page(A) that contains a frame within(B).
(A) contains a drop down list with multiple options.

Problem:
Writing all the options from the dropdown list from (A) to a dropdownlist in (B).
like simplified explenation for some: copy this.parent.form.objectname.*?* to parent.theframe.form.objectname2.*?* ,(this will be performed as an onload event)

Thought:
[..onload function..] parent.theframe.form.objectb.options = this.parent.form.objecta.options.
However this does not work, it will only copy the selected option in the this.parent box.

Solution:
??

Thank you in advance for you time, I will remain searching for my answer in the meanwhile.

Jona
09-03-2003, 10:42 PM
Well, I know this isn't completely what you're looking for, but it's a start... The Switchbox (http://jona.t35.com/experiments/the_switchbox.html)

[J]ona

Shampie
09-05-2003, 12:01 PM
I've been trying things out with the code from the page mentioned above but I couldn't get anything working with it.

the information in dropdownlist: this.parent.form.selectwpn needs to be copied (as onload) to parent.myFrame.form.sellwpn

Does the seletwpn need to be read line by line and then added into the sellwpn dropdown?

...?

Jona
09-05-2003, 12:24 PM
Originally posted by Shampie
I've been trying things out with the code from the page mentioned above but I couldn't get anything working with it.

the information in dropdownlist: this.parent.form.selectwpn needs to be copied (as onload) to parent.myFrame.form.sellwpn

Does the seletwpn need to be read line by line and then added into the sellwpn dropdown?

...?

I was hoping my script would help out some... It should be relatively simple, since all you have to do is get all of the data from the select box in the main frame, and send it to the other select box. My script is quite basic, but I'll probably find some time later today to work on a framed one.

Cheers!
[J]ona

Shampie
09-05-2003, 12:38 PM
Your help and time to help is grately appreciated! (checkyou pm)

Jona
09-05-2003, 07:17 PM
Attached is the answer to your problem.

[J]ona