PDA

View Full Version : window dimesions


charter
10-29-2002, 09:41 AM
As a Javascript newbie, Can anyone please help?

If I want a browser window to open with just the TITLE BAR at the top and the TASKBAR at the bottom and the rest of the window to be the web page, what code would I use?

I wish for the window to size automatically no matter what size monitor or screen resolution is set at.

If you wish to see what I mean an example site is at www.bladeinteractive.com when the second page is automatically launched.

Also would I put the code in the Head or Body.

All help much appreciated.

aEr_aEr
10-29-2002, 09:56 AM
If you look at the source you can see how it is done

put this in the head:

<script language="JavaScript">
function tmt_fullscreen(url, scrollo) {
var larg_schermo = screen.availWidth - 10;
var altez_schermo = screen.availHeight - 30;
window.open(url, "WindowName", "width=" + larg_schermo + ",height=" + altez_schermo + ",top=0,left=0,scrollbars=" + scrollo + "");
}
</script>


and this in the body tag

onLoad="tmt_fullscreen('framelayout.htm','no')"


hope this helps