Return to Main Menudzigns by ShivSpacer
 
Explanation
(Requires Javascript1.2 enabled Browsers - Version 4 or above)


Here's a script that could be useful to a lot of people. Do you have Pop-up windows on your Site? You can't make up your mind What should be the ideal size of that pop-up Window - given that people use different Font size settings? Here's a script - easy & simple, that would solve your problem. But do remember, it will work on JavaScript 1.2 enabled browsers only, i.e. - On version 4 or higher.

Just paste the script below into the head part of the Page that you want re-sized. And call for the function (which I've called "maxsize") on BODY load. The only point to remember is to position the Pop-up window in your "Open" command at '0,0' - that is at Top=0 & Left=0. The pop-up will then take the size of your window when loaded.

YOU CAN TEST IT HERE

The script

Paste this section within the HEAD tags

<script language="javascript">
<!--
// Written & created by Shivaji Basu
// Copyright www.shivbasu.com
// Use this script at your own risk
// To use his script, you MUST leave this disclaimer & credit as it is.

var browser = '';
var entrance = '';
// browsercheck step1
browser = 'one';
//-->
</script>

<script language="javascript1.2">
<!--
// browsercheck step2
browser = 'oneone';
//-->
</script>

<script language="javascript">
<!--
if (browser == 'oneone') entrance = 'yes';
if (browser == 'one') entrance = 'no';
function maxsize(){
if(entrance=='yes'){
var W=screen.width;
var H=screen.height;
self.resizeTo(W,H);
}
}
//-->
</script>

Paste this part within the OPENING Body tag for Auto execute

<BODY onload="maxsize()" background="" bgcolor="" .....>
// Fill in the Background Image URL, BG color etc as normal



Copyright DBS © 1998-2003. All Rights Reserved