Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expand pop up window 1

Status
Not open for further replies.

soonkhoo

Programmer
Dec 8, 2000
133
MY
Hi all, how can I auto maximize a pop window? Thanks

Soon
 
You can use the following code:

<A HREF=&quot;yourfilehere.html&quot; onclick=&quot;NewWindow(this.href,'name','800','600','yes');return false&quot;> link here</A>

The 800 x 600 would be the full size resolution that I would use because you are not sure if the user is at 1024 x 768 or 800 x 600.

Another way would be below:

<script language=&quot;JavaScript1.2&quot;>
<!--

/*
Auto Maximize Window Script- By Nick Lowe (nicklowe@ukonline.co.uk)
For full source code, 100's more free DHTML scripts, and Terms Of Use
Visit */

top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>

This is a javascript that should be placed between the head tags of the popup window. It will automatically maximize the window the the users resolution.

Hope this helped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top