Limiting the dimensions of a new window?
#2
<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
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.
Thread
Thread Starter
Forum
Replies
Last Post