/    Sign up×
Community /Pin to ProfileBookmark

Subwindow problem

Right, this is a little hectic so I’ll post the code first.

[code]
<script language=”javascript”>
var a2c_width;
var a2c_height;
var a2c_window;
function a2c_popup(a2c_height,a2c_width)
{
if(!a2c_window || a2c_window.closed)
{
a2c_window=window.open(‘a2c_popup.php’,’_blank’,’location=no, left=200, top=200, screenx=200, screenY=200, menubar=no, resizable=no, scrollbar=no
}
else
{
a2c_window.focus();
a2c_window.refresh();
}
}
</script>
[/code]

Right so if the sub window is open and the link is clicked, rather than opening another the focus is just moved back to the subwindow. Now, if another link is clicked on the parent window and then the link to open this is clicked again (still called a2c_window) a new window is opened. What I want to happen is for the parent window to stay aware of the subwindow even after it has moved to a different page.
Hope this makes sense
Rob

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliSep 09.2003 — if you assign different names to popup windows then parent window will know about the child

window.open("url','unik_win_name_here','propertoes');
Copy linkTweet thisAlerts:
@OhLordyauthorSep 10.2003 — Cool, thanks! How do I then refeerence that window in a later page for, say, focus() or close()?

Cheers

Rob
×

Success!

Help @OhLordy 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.18,
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,
)...