SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast subBlue's Avatar
    Join Date
    Jun 2001
    Location
    Edinburgh, UK
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Getting variable from a frame within another browser window?

    I have a situation where i'm wanting to grab a variable that is created by a framed page in another browser window. I can access the variable like: opener.debug_vars however when the framed browser window reloads the opener object is null, so i need to reference it explicity.

    My popup window i'm grabbing from is called debugWin and the frame i'm trying to grab the variable from is called mainFrame.

    Any help would be appreciated thanks
    Become Interactive because its all gone a bit subBlue

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add this to the popup page:
    ...
    <head>
    <script language="javascript">
    var top = window.opener.top;
    </script>
    </head>
    <body>
    ...


    Then you can get opener.debug_vars with
    top.frames[0].debug_vars
    (if opener/mainFrame is frame #1)
    Last edited by jofa; Nov 24, 2002 at 11:18.


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
  •