By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,659 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Adjusting the width and height of a popup window

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.