/    Sign up×
Community /Pin to ProfileBookmark

Two scripts same page?

I need to run two onclick popups on the same page – can this be done?
I can get both different pages to popup, but they are very small – they seem to be defaulting to a fixed size.

The script I’m using is this: – any help is really appreciated!

<script language=”JavaScript”>
<!– hide

function openNewWindow(‘popup1.html’) {
popupWin = window.open(‘popup1.html’,
‘target01_window’,
‘scrollbars=no,resizable=yes,width=600,height=700’)
}

function openNewWindow(‘popup2.html’) {
popupWin = window.open(‘popup2.html’,
‘target01_window’,
‘scrollbars=no,resizable=yes,width=900,height=800’)
}

// done hiding –>

</script>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@FangApr 29.2005 — function openNewWindow(doc, w, h) {
popupWin = window.open(doc, 'target01_window', 'scrollbars=no,resizable=yes,width='+w+',height='+h+' ' )
}

openNewWindow('popup1.html', 600, 700)
openNewWindow('popup2.html', 900, 800)
×

Success!

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