PDA

View Full Version : ...window size


chompos
05-01-2001, 01:40 PM
I'm wondering if there is a "set property" command that I can use at the beginning of my movie, so that when it's launched, the browser opens a new window of the correct size and places it in the center of the users monitor.
thanks

mgb
05-01-2001, 07:24 PM
Use this to create a new window;

<TITLE>centWin</TITLE>
<script language="JAVASCRIPT" type="TEXT/JAVASCRIPT"><!--
if(screen){
topPos=0
leftPos=0
}
function getPage(thePage,wt,ht){
leftPos= (screen.width-wt)/2
topPos = (screen.height-ht)/2
newWin1 = window.open(thePage,'aWin','toolbars=no,resizeable =no,scrollbars=no,left='+leftPos+',top='+topPos+', width='+wt+',height='+ht)
}
// -->
</script>
</HEAD>

Place it in the head section of the page that LAUNCHES the popup and for your GetURL action;

GetURL("javascript:getPage('yourfile.html',400,500)")

~mgb