/    Sign up×
Community /Pin to ProfileBookmark

Page should always be loaded in popup

I’ve got an index page and several subpages which all have to be loaded in popups. Now I’m looking for a script which checks if a page is loaded in a popup or not (like a check script for frame content). If a subpage is opened directly in the parent window (for example a search engine result), I’d like to open it in a popup and switch the parent window to the index page.

A script like this doesn’t seem to work:

[CODE]
function checkWindow()
{
if(window.opener == null)
document.location.href=”index.php”;
window.open(‘page.htm’,’windowName’,’500,400′);
}
[/CODE]

Does anybody have any idea?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@MillheadauthorMay 11.2005 — anybody any idea?
×

Success!

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