/    Sign up×
Community /Pin to ProfileBookmark

open two browser windows with one link, one page in the backgroud

Does anybody know how to open two web pages or one plus a pop up page with only one link. Also one of these pages has to open behind the other. The point of the funtion is this. The user clicks the link on my site homepage. one of the windows possibily the popup will have my flash site on it ansd the other will be in the background so the user wont see. when the user has finished surfing my site they will probably close the broswer window and low and behold there will be the other pages thanking them for visiting my site.

Has anyone ever heard of a way how to do this. I know how to open a page already with a poup window delay but this is no good as the popup does not open int eh background.

Thanks.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@AdamBrillFeb 13.2003 — Try something like this:
<i>
</i>&lt;script language=javascript&gt;
function go()
{
win = window.open("http://www.yourdomain.com/thankyou.htm");
win.blur();
win2 = window.open("http://www.yourdomain.com");
}
&lt;/script&gt;

Then, call it like this:
<i>
</i>&lt;a href="http://www.yourdomain.com" onclick="go(); return false" &gt;The Link&lt;/a&gt;


That will popup both pages. If you only want the thank you page to popup, try this:

<i>
</i>&lt;script language=javascript&gt;
function go()
{
win = window.open("http://www.yourdomain.com/thankyou.htm");
win.blur();
}
&lt;/script&gt;

And then call it like this:

<i>
</i>&lt;a href="http://www.yourdomain.com" onclick="go(); return true" &gt;The Link&lt;/a&gt;

I hope that helps!
Copy linkTweet thisAlerts:
@harpmanauthorFeb 14.2003 — Thanks Adam, I really appreciate your help. Have a good day!!?
×

Success!

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