SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)

    Calling functions between parent and child windows

    Hi,

    I'm after a simple example of how you can
    • launch a popup window,
    • click a button and send information back to the parent.


    It needs to work cross-browser,


    Thanks,

  2. #2
    SitePoint Member vidalstat's Avatar
    Join Date
    Dec 2007
    Location
    Brooklyn NY
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    child parents

    only child and parent windows can communicate with each other. you can access the parent of a window by using the opener object example :

    Code:
    opener.document.bgColor = blue;
    from parent to child:
    give child window a name:
    Code:
    childwindow = window.open("samp061.htm etc etc.. . . . . . .
    then reference it by name:

    Code:
    childwindow.document.bgColor = blue;
    Hope this helps!

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    It does,

    Cheers


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
  •