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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daedalous

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

    This is what I currently have:

    parent.frames['iframe1'].document.getEl ementById['layer'].frames['iframe2'].document.forms['form2']['field2'].value
    = parent.frames['iframe1'].document.forms['form1']['field1'].value
  • Randy Webb

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

    Daedalous wrote:
    [color=blue]
    > This is what I currently have:
    >
    > parent.frames['iframe1'].document.getEl ementById['layer'].frames['iframe2'].document.forms['form2']['field2'].value
    > = parent.frames['iframe1'].document.forms['form1']['field1'].value[/color]

    And where are you trying to get to?

    --
    Randy

    Comment

    • Lasse Reichstein Nielsen

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

      daedalous@netma deira.com (Daedalous) writes:
      [color=blue]
      > This is what I currently have:
      >
      > parent.frames['iframe1'].document.getEl ementById['layer'].frames['iframe2'].document.forms['form2']['field2'].value
      > = parent.frames['iframe1'].document.forms['form1']['field1'].value[/color]

      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 - lrn@hotpop.com
      DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
      'Faith without judgement merely degrades the spirit divine.'

      Comment

      • Daedalous

        #4
        Re: Get form values from iframe (1) to iframe (2) inside a layer in iframe (1)

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

        document.frames['iframe2'].document.getEl ementById('valu e2').value =
        somevaluejustto test;

        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.

        Comment

        Working...