Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Aug 2003
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Removing status/menu bars on pageLoad

    Hi there, I am using the following javascript function to resize and position a window when opened (using the onLoad to call the function)

    function positionWindow()
    {
    theScreen = window.screen;
    window.moveTo((theScreen.width/2)-400,(theScreen.height/2)-300);
    window.resizeTo(800,600);
    window.focus();
    }

    My question is: how do I add to this code to take off the status bar, scrolls, menu bar, address bar etc...

    many thanks for any help

    Matt

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you want to remove things from the window you have to open a new window without those things. By design, browsers won't let you alter the "chrome" on an existing window.

    You will also find that most people think that moving and resizing an existing window is a pretty rude thing to do as well. Since the user normally sets the size and position of the window to meet their own preferences. Be sure you've got a really, really good reason for doing that.
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

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