PDA

View Full Version : How to Auto maximize window with out toolbar,address bar and menu bar



Naresh
01-29-2005, 11:52 AM
here i had code how to maximise window from DD but i would like to know that how to remove address bar, toolbar and menu bar.

Here i your code
<script language="JavaScript1.2">
<!--

/***********************************************
* Auto Maximize Window Script- Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for this script and 100's more.
***********************************************/

top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>

please help in doing so.

thank you

mwinter
01-29-2005, 12:32 PM
[...] i would like to know that how to remove address bar, toolbar and menu bar.You can only remove chrome when opening a new window. Even then, you should leave the chrome as it is: you don't have the right to fiddle with a visitor's user agent.


[Off-topic]


<script language="JavaScript1.2">Can this nonsense be removed from all scripts on this site. This is especially important with language attribute values of "JavaScript1.2". As I've said previously, a user agent which honours this change in language will probably fail to run the script as version 1.2 of the JavaScript language contains some odd syntax rules that don't exist in other versions (before or after). To a lesser extent, it also encourages the use of invalid mark-up.

All that is necessary is:


<script type="text/javascript">Similarly,


<!--SGML comment delimiters should not be presented in the scripts. This construct has no business appearing in modern scripts as no user agent will misinterpret a script element. If any "hiding" is to be recommended, it should be in the form of exporting the script into an external file. Reusable scripts should always be "externalised" anyway so they can be cached.

[/Off-topic]

Mike