/    Sign up×
Community /Pin to ProfileBookmark

cliackable link that opens up a new page and a pop-under

ive been searching around for a long time trying to find code that would do this. I need 1 link click to open up a new full size page and also a popunder at the same time. I would really appreciate any help. thanks guys

here’s some popup code i found that works on a link click.

[CODE]<script language=”javascript” type=”text/javascript”>
<!–
function popitup(url) {
newwindow=window.open(url,’name’,’height=200,width=150′);
if (window.focus) {newwindow.focus()}
return false;
}

// –>
</script>
[/CODE]

[CODE]
<a href=”popupex.html” onclick=”return popitup(‘popupex.html’)”
>Link to popup</a>[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@donatelloOct 11.2009 — [code=html]<script language="javascript" type="text/javascript">
<!--
function popitup(url) {
newwindow=window.open(url,'name','height=200,width=150');
if (window.focus) {newwindow.focus()}
return false;
}

// -->
</script>[/code]


Did you try:

Code:
[code=html]<a href="popupex.html" onclick="return popitup('popupex.html');window.open('http://www.YOURURL.htm','mywindow','width=400,height=200')">Link to popup</a>[/code]

For a new browser window:

[code=html]<a href="popupex.html" onclick="return popitup('popupex.html');window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200,toolbar=yes,
location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes')">LINK TEXT</a>[/code]



This used to work:
[code=html]<html>
<head>
<script type="text/javascript">
function open_win() {
window.open("http://www.window1.com/")
window.open("http://www.window2.com/")
}
</script>
</head>

<body>
<form>
<input type=button value="Open Windows" onclick="open_win()">
</form>
</body>

</html>[/code]
Copy linkTweet thisAlerts:
@garrett1authorOct 11.2009 — that last code worked for me. Its perfect for what i want to do. thanks a ton for the help
×

Success!

Help @garrett1 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.2,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...