Results 1 to 2 of 2

Thread: How to Auto maximize window with out toolbar,address bar and menu bar

  1. #1
    Join Date
    Jan 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post How to Auto maximize window with out toolbar,address bar and menu bar

    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

  2. #2
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by Naresh
    [...] 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]

    HTML Code:
    <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:

    HTML Code:
    <script type="text/javascript">
    Similarly,

    HTML Code:
    <!--
    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •