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

Discussion in 'Javascript' started by Daedalous, Jan 15, 2004.

  1. Daedalous

    Daedalous Guest

    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
     
    Daedalous, Jan 15, 2004
    #1
    1. Advertising

  2. Daedalous

    Randy Webb Guest

    Re: Get form values from iframe (1) to iframe (2) inside a layerin iframe (1)

    Daedalous wrote:

    > 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?

    --
    Randy
     
    Randy Webb, Jan 15, 2004
    #2
    1. Advertising

  3. Re: Get form values from iframe (1) to iframe (2) inside a layerin iframe (1)

    (Daedalous) writes:

    > 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
    --
    Lasse Reichstein Nielsen -
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Jan 15, 2004
    #3
  4. Daedalous

    Daedalous Guest

    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.
     
    Daedalous, Jan 16, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YzY3NjIyOA==?=

    do it in database layer or application layer

    =?Utf-8?B?YzY3NjIyOA==?=, Jan 26, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    434
    Karl Seguin [MVP]
    Jan 27, 2006
  2. et
    Replies:
    2
    Views:
    1,919
  3. dan
    Replies:
    25
    Views:
    1,339
    Uncle Bob (Robert C. Martin)
    Oct 28, 2003
  4. Federico Bari
    Replies:
    2
    Views:
    1,956
    Federico Bari
    Aug 31, 2003
  5. Dhananjay
    Replies:
    1
    Views:
    1,126
    sloan
    Dec 18, 2006
Loading...

Share This Page