469,927 Members | 1,777 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Adjusting the width and height of a popup window

Hi,
Im working on a site for a friend, and we've setup a popup window for
a couple pages, but with the code we have, the variables for the width
and height are in the <script> portion of the code, and not on each
individual popup code segment. Is there a way I can add "width=400" or
something to each popup to change its width?

Here's the script portion-

<!--
function Start(page)
{
OpenWin = this.open(page,
"CtrlWindow","toolbar=No,menubar=No,location=No,sc rollbars=No,resizable=No,status=Yes,width=740,heig ht=560,left=0,top=0,");
}
//-->
</SCRIPT>
and heres the link to the popup-

<a href="javascript:void(0);" onclick="javascript:Start
('map/map.htm');">
Any suggestions?
Thanks for your time,
Jesse Acosta
jessejosephacosta att hotmail dott com
Jul 20 '05 #1
1 4115
Ivo
"Jesse Joseph Acosta" <no*****@icehouse.net> wrote in message
news:43**************************@posting.google.c om...
Hi,
Im working on a site for a friend, and we've setup a popup window for
a couple pages, but with the code we have, the variables for the width
and height are in the <script> portion of the code, and not on each
individual popup code segment. Is there a way I can add "width=400" or
something to each popup to change its width?
Make it a function with an extra argument, and insert that in the attributes
string:

function Start(page,height)
{
OpenWin = this.open(page,
"CtrlWindow","toolbar=No,menubar=No,location=No,sc rollbars=No,resizable=No,s
tatus=Yes,width=740,height=" + height + ",left=0,top=0");
}
and heres the link to the popup-


<a href="javascript:void(0);" onclick="javascript:Start
('map/map.htm',400);">


Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by cschang | last post: by
2 posts views Thread by Newbie | last post: by
4 posts views Thread by joebi | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.