Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Limiting the dimensions of a new window?

Thread Tools
 
Search this Thread
 
Old 18 January 2005 | 04:47 PM
  #1  
Figment's Avatar
Figment
Thread Starter
Scooby Regular
 
Joined: Jul 2001
Posts: 24,057
Likes: 0
From: deep inside your imagination
Default Limiting the dimensions of a new window?

As title, how do I limit the size of a window that is being opened by javascript?


Thanks
Old 18 January 2005 | 04:55 PM
  #2  
SJ_Skyline's Avatar
SJ_Skyline
Scooby Senior
 
Joined: Apr 2002
Posts: 21,922
Likes: 1
From: Limbo
Default

<script language="JavaScript">
function openWindow(url, width, height)
{
window.open(url,'WindowName','width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,status=yes');
}
</script>

Change resizable=yes,scrollbars=yes,status=yes if you want resizing, scrolling, etc.



call this function by something like:

<a href="javascript: openWindow('/filename.htm',350,450)">link text</a>
Without the space between : and o

Last edited by SJ_Skyline; 18 January 2005 at 04:57 PM.
Old 18 January 2005 | 05:53 PM
  #3  
Figment's Avatar
Figment
Thread Starter
Scooby Regular
 
Joined: Jul 2001
Posts: 24,057
Likes: 0
From: deep inside your imagination
Default

Cheers Rich
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
JimBowen
ICE
5
02 July 2023 01:54 PM
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
FuZzBoM
Wheels, Tyres & Brakes
16
04 October 2015 09:49 PM
Ganz1983
Subaru
5
02 October 2015 09:22 AM
blackieblob
ScoobyNet General
4
01 October 2015 11:37 AM



Quick Reply: Limiting the dimensions of a new window?



All times are GMT +1. The time now is 08:15 AM.