/    Sign up×
Community /Pin to ProfileBookmark

setting a window with fixed size to pop up when link is clicked?

Can anyone tell me how to open a new window that is not resizeable, but is of a fixed size when I click the link on the original page? Should I be using HTML or is it a Java problem? I need a window to pop up snapped to the size of my flash content (775×680) and I can’t figure it out. I’m stuck and getting close to a deadline, please help!

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@KDLAFeb 14.2006 — Put this in the <head>

<script type="text/javascript">

var newwindow;

function flashwindow(url)

{

newwindow=window.open(url,'name','height=680,width=775,status=yes,left=75,top=100');

if (window.focus) {newwindow.focus()}

}

</script>

And use this for the link:

<a href="javascript:flashwindow('fileaddress.htm');">Link Text</a>

You'll need to change the fileaddress.htm to the proper address.

KDLA
Copy linkTweet thisAlerts:
@jacobdeschauthorFeb 14.2006 — I'm not having any luck with this for some reason. I can't get the link to do anything from the original main page. I don't know what I'm doing wrong, and I feel kinda stupid asking this, but it's frustrating.
Copy linkTweet thisAlerts:
@welshFeb 14.2006 — post the page with the code on it.
Copy linkTweet thisAlerts:
@jacobdeschauthorFeb 14.2006 — ok, the original page is http://www.jacobdesch.com and I want it to link to http://www.jacobdesch.com/Jeenyus/jeenyus.html, having it pop up in a new window that isn't resizeable.
Copy linkTweet thisAlerts:
@welshFeb 14.2006 — u didnt place this in the header:
[code=html]
<script type="text/javascript">
var newwindow;
function flashwindow(url)
{
newwindow=window.open(url,'name','height=680,width=775,status=yes,left=75,top=100');
if (window.focus) {newwindow.focus()}
}
</script>
[/code]
so your header should look like [code=html]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Jacob Desch - Graphic Designer - Coming Soon.</title>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #000000;
}
.style1 {font-family: Arial, Helvetica, sans-serif}
-->
</style>
<script type="text/javascript">
var newwindow;
function flashwindow(url)
{
newwindow=window.open(url,'name','height=680,width=775,status=yes,left=75,top=100');
if (window.focus) {newwindow.focus()}
}
</script>
</head>
[/code]
Copy linkTweet thisAlerts:
@jacobdeschauthorFeb 14.2006 — wow, I'm an idiot. thanks a lot for you help.
Copy linkTweet thisAlerts:
@welshFeb 15.2006 — i prefer the term mentally challenged : :p
×

Success!

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