SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Writing from Window to Window..

    Hey everyone,

    When I have a link open a new window, and I want to write back, I use opener.document and so on, but here is the problem...

    Im opening a new window, which has an iframe inside it.. What I need to do, is write something from the iframe, to the window that launched the popup.. ( everyone understand me so far? )

    Thanks,
    Eric
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  2. #2
    SitePoint Wizard davidjmedlock's Avatar
    Join Date
    Dec 2002
    Location
    Nashville, TN USA
    Posts
    1,688
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Zaire
    Hey everyone,

    When I have a link open a new window, and I want to write back, I use opener.document and so on, but here is the problem...

    Im opening a new window, which has an iframe inside it.. What I need to do, is write something from the iframe, to the window that launched the popup.. ( everyone understand me so far? )

    Thanks,
    Eric
    Hey Eric,

    I'm not 100% sure about this but in the new window, I think what you need to do is:

    Code:
    parent.window.opener.document.write("blah");
    I think the iFrame works like a normal frame and you refer to the document that contains it as "parent", then get that document's opener and do what you want with it... Hope this helps!

  3. #3
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, Works great.. I forgot about parent untill last night when I was messing with frames
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •