/    Sign up×
Community /Pin to ProfileBookmark

New window size.

Have a link to a new window, how do I make the window from the link opens into a certain size that cannot be changed?

Thanks.

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@PittimannNov 26.2003 — Hi!

You have to do something like that:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Your title</title>

<script type="text/javascript">

function OpenPopup(){

var YourWidth=600;// change to the desired width in pixels

var YourHeight=400;// change to the desired height in pixels

values =

'height='+YourHeight+',width='+YourWidth+',resizable=no';

MyNewWindow=window.open('MyfileToBeOpened','',values);//replace MyfileToBeOpened with path to the file to be displayed

}

</script>

</head>

<body>

<a href="#" title="&nbsp;Click here to open blahblah&nbsp;" onClick="javascript?penPopup();">Click here</a>

</body>

</html>

Cheers - Pit
Copy linkTweet thisAlerts:
@fredmvNov 28.2003 — &lt;a href="foo.html" onclick="window.open(this.href, '', 'height=300,width=300');return false;"&gt;Open foo.html.&lt;/a&gt;
×

Success!

Help @Nasimov 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.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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