Get form values from iframe (1) to iframe (2) inside a layer in iframe (1)

D

Daedalous

This is what I currently have:

parent.frames['iframe1'].document.getElementById['layer'].frames['iframe2'].document.forms['form2']['field2'].value
= parent.frames['iframe1'].document.forms['form1']['field1'].value
 
R

Randy Webb

Daedalous said:
This is what I currently have:

parent.frames['iframe1'].document.getElementById['layer'].frames['iframe2'].document.forms['form2']['field2'].value
= parent.frames['iframe1'].document.forms['form1']['field1'].value

And where are you trying to get to?
 
L

Lasse Reichstein Nielsen

This is what I currently have:

parent.frames['iframe1'].document.getElementById['layer'].frames['iframe2'].document.forms['form2']['field2'].value
= parent.frames['iframe1'].document.forms['form1']['field1'].value

Try
parent.frames['iframe1'].frames['iframe2'].document.forms['form2'].
elements['field2'].value =
...
I.e., drop the getElementById. That just gives you an element on the page,
which has no frames attriute (only in Netscape 4 did layers contains
documents, in later browsers there was no such thing as a <layer>, and
only the name stuck (to much confuzion)).

/L
 
D

Daedalous

I'm now able to get values into the iframe2 by using:

document.frames['iframe2'].document.getElementById('value2').value =
somevaluejusttotest;

But I am still unnable to get the values from the first iframe into
the the one in the second iframe.

Thank you in advance and to those that already did or tried.
 

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

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top