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 6816821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:58:18+00:00 2026-05-26T20:58:18+00:00

I have two windows: the parent and the popup . Obviously parent has a

  • 0

I have two windows: the parent and the popup. Obviously parent has a reference to popup. Now in popup I have a function say

function test() { alert('test'); }

and I want to call this function in parent, something like popup.test();. Is there a way to do that? I do know how to do that the other way around. Just declaring

window.test = function() { alert('test'); }

and calling window.opener.test(); in popup works fine. However this does not work in my case (I think because the window.opener object is a reference, but window.open and window in popup are not really related). Any ideas?

  • 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-26T20:58:18+00:00Added an answer on May 26, 2026 at 8:58 pm

    It really depends on the context where you defined the function for the popup window. Assuming you attached the functions/data to the window object of the popup window, you can access it from the window handle returned by window.open (the window handle is the window object for the popup):

    var w = window.open(somelocation,''); //has a function on `window` called "test"
    w.test();
    

    I’m going to assume that you understand how security sandboxes work for popup windows

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

Sidebar

Related Questions

Let's say I have two windows services running. One service is 'Polling' - it
I want to have two Emacs windows on the screen: one for Dired and
I have two running processes in Windows, and each process has a pipe to
I have two windows application, one is a windows service which create EventWaitHandle and
How can you combine two windows in Screen? I have two windows such that
I have two installations of Windows 7. a 64bit version on my hard disk,
Two Windows processes have memory mapped the same shared file. If the file consists
I have two virtual hosts on windows(for example: test1.dev and test2.dev). But it always
I have two languages set in my windows settings - Czech (default) and English
I have two client applications connecting to an Windows Server AppFabric Cluster (there is

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.