/    Sign up×
Community /Pin to ProfileBookmark

Two popups on one screen

I want to put two pupups on one screen (they only appear when a link is clicked so it will not be annoying). I have the code for one popup, but how do I change it to display the second popup ( which has different dimensions) as well? This is my current code:

<!– Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval(“page” + id + ” = window.open(URL, ‘” + id + “‘, ‘toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=350,height=650’);”);
}
// End –>

Thanks very much!
Theo Richel

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@steelersfan88Mar 11.2004 — [code=php]function popUp(URL,URL2) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=0,width=350,height=650');");

eval("page2" + id + " = window.open(URL2, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,men
ubar=0,resizable=0,width=350,height=650');");
}[/code]
Then make sure you send an argument for URL to when clicking the link
Copy linkTweet thisAlerts:
@TheoRichelauthorMar 11.2004 — Thank you very much for the quick reply. It remains however unclear how I should make hyperlink 1 to open popup 1 and link2 popup 2. It probably has to do with 'id', but the link I use is:

javascript:popUp('nabestellingwalm.htm')

thank you again
Copy linkTweet thisAlerts:
@steelersfan88Mar 11.2004 — misunderstood your ? what is the problem u hav?
Copy linkTweet thisAlerts:
@TheoRichelauthorMar 11.2004 — I have two popups on one page that I like to call with two different links. You have shown me that this is possible if I insert a copy of the code in the header, with an identifaction that this is the second one. I think I have don that allright. But what do I do with the hyperlinks tehmselves.? Or have I misunderstood you and should I put the names of the pages in the code on top where in says URL and URL2. (When I still used only one popup it simply said url + id etc.

Hope I make myself clear
Copy linkTweet thisAlerts:
@steelersfan88Mar 11.2004 — why don't you use this instead:[code=php]<a href="myPage.htm" onclick="window.open(this.href,'_blank',config='.......');return false;">Text</a>[/code]
Copy linkTweet thisAlerts:
@TheoRichelauthorMar 12.2004 — This one worked, thanks very much!

Theo Richel
×

Success!

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