Returning value from an iframe

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

    Returning value from an iframe

    Hello to all,

    Perhaps this is trivial, but i am very novice ...

    I have a main window with a form, from here i can open a popup window
    from where select elements from a table. This table is inside a iframe
    in this child window.

    How could I reference the elements in the main form inside the iframe
    code? Who is the parent/opener of the iframe?

    If i have not explained in a cleary way, please let me know ...

    Thanks in advance!

  • Lasse Reichstein Nielsen

    #2
    Re: Returning value from an iframe

    Nuck <nuck@nowhere.c om> writes:
    [color=blue]
    > I have a main window with a form, from here i can open a popup window
    > from where select elements from[/color]

    form?
    [color=blue]
    > a table.[/color]

    This sentence no verb! :)
    [color=blue]
    > This table is inside a iframe
    > in this child window.
    >
    > How could I reference the elements in the main form inside the iframe
    > code?[/color]

    parent.opener.f orms['formName'].elements
    [color=blue]
    > Who is the parent/opener of the iframe?[/color]

    The parent of an iframe is the page it is embedded in. It is not a
    window, so it has no opener.

    You can read more here:
    <URL:http://www.infimum.dk/HTML/JSwindows.html# ref_2_6>
    [color=blue]
    > If i have not explained in a cleary way, please let me know ...[/color]

    The questions were clear. The description was a little typo'ed.

    /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

    • VK

      #3
      Re: Returning value from an iframe

      by the complicity of the solution I assume you are trying to get info
      from a 3rd part. If so, you cannot do it 'cause of security restrictions
      (like get a stock quote from NASDAQ and place it on your page w/o
      "boring" ad).
      If I'm miserably wrong and all happens under your domain, then the call
      from iframe to the opener's function would be
      self.parent.ope ner.functionNam e()


      Comment

      Working...