/    Sign up×
Community /Pin to ProfileBookmark

Changing window A from inside window B

I keep running into this generic situation in varioius guises, and need clarification to get it right:

Suppose you have a web page with two buttons. When you click button A, it opens a new window and names it “windowA”. When you click button B, it opens another window and names it “windowB”.

Suppose that window B has a button in it. One of the things that is supposed to happen when this button in pressed is a change to window A, for example, it gets resized, repositioned, or focus is brought to it, or whatever. How does one refer to the name of windowA from inside windowB? Is it “parent.windowA” or “_parent.windowA” or something else, or do you have to give the top window its own name to begin with?

Thanks in advance.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Feb 03.2008 — [B]parent[/B] is for [B]frames[/B].

[B]window.opener[/B] is for[B] pop up windows[/B].

Eric
×

Success!

Help @rgrne spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...