/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Popup

I want to open a new window and control its size.

i m using:

function popUpNew(URL,WW,HH) {
day = new Date();
id = day.getTime();

eval(“page” + id + ” = window.open(URL, ‘” + id + “‘,
‘toolbar=1,scrollbars=1,location=0,statusbar=1,menubar=1,resizable=1,width=WW,height=HH,left
= 440,top = 280′);”);
}

and calling it with

<a href=”javascript:popUpNew(‘www.google.com’,800,600)”>

BUT

this dont work…. can someone give me some help ?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@LeeUMar 28.2007 — Try this:

[CODE]
<script type="text/javascript">
<!--
function newWin(link,w,h,s,r) {
var winFeatures = 'width=' + w + ',height=' + h + ',scrollbars=' + s + ',resizable=' + r;
var bookWindow = window.open(link, "", winFeatures);
}
//-->
</script>



<a href="http://somewhere.com" onclick="newWin(this.href,500,400,'yes','yes'); return false;"></a>[/CODE]
Copy linkTweet thisAlerts:
@caodocilauthorMar 28.2007 — Try this:

[CODE]
<script type="text/javascript">
<!--
function newWin(link,w,h,s,r) {
var winFeatures = 'width=' + w + ',height=' + h + ',scrollbars=' + s + ',resizable=' + r;
var bookWindow = window.open(link, "", winFeatures);
}
//-->
</script>



<a href="http://somewhere.com" onclick="newWin(this.href,500,400,'yes','yes'); return false;"></a>[/CODE]
[/QUOTE]




100% Working ? Thank You Very Much!
Copy linkTweet thisAlerts:
@caodocilauthorMar 28.2007 — 100% Working ! Thank You Very Much ?
Copy linkTweet thisAlerts:
@LeeUMar 28.2007 — Great. Glad I could help.
×

Success!

Help @caodocil 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 6.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: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

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