Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7655879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:37:37+00:00 2026-05-31T12:37:37+00:00

How do I access a global object or array defined in a parent window

  • 0

How do I access a global object or array defined in a parent window in the child window.

<script>
    var events_data;
    function function_to_fill_events_data () {
      .
      .
      .
    }
</script>

<div>
    <div><iframe src="mini.php" width:100%; height: 100%;" scrolling="no"></iframe> </div>
</div>

When I am in the mini document I’d like to be able to access the events_data variable in a javascript function.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:37:39+00:00Added an answer on May 31, 2026 at 12:37 pm

    Option 1

    Your title mentions a child window. If you have a child window, and not an iframe, use this:

    window.opener.events_data
    

    Check out window.opener on MDN.

    Option 2

    Your code indicates that you’re using an iframe. From an iframe, simply use parent:

    parent.events_data;
    

    Check out window.parent on MDN.


    window.opener – Returns a reference to the window that opened this current window.

    window.parent – When a window is loaded in an , , or , its parent is the window with the element embedding the window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Should I access global db object directly from within the methods of each class?
I was wondering how to access a global function fn in ruby from a
I seem to have an array scope issue. I have a global variable; var
I have Chrome 7.0 and am trying to access fields of a global object.
Scenario: there is a global array $cache . there is 1 function, cacheWriter() ,
I have a singleton class for global access to config information. This singleton class
We have a need to access kernel global vars in net/ipv4/af_inet.c that are not
I want to access the user data as global in whole website. I make
Assuming that the mysqli object is already instantiatied (and connected) with the global variable
To keep the global namespace clean, my JavaScript code is wrapped like this: (function()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.