Adjusting the width and height of a popup window

  • Thread starter Jesse Joseph Acosta
  • Start date
J

Jesse Joseph Acosta

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,scrollbars=No,resizable=No,status=Yes,width=740,height=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
 
I

Ivo

Jesse Joseph Acosta said:
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,scrollbars=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);">
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top