Results 1 to 5 of 5

Thread: Javascript Window Properties

  1. #1
    792
    posts
    She Bangs! She Bangs!

    Javascript Window Properties

    Hello,

    Can someone tell me how to include the window properties into this script? Menubar, Toolbar, Resize, Scrollbar, etc.?

    HTML Code:
    <html>
    <head>
    <title></title>
    
    <script type="text/javascript" language="JavaScript">
    
    
    <!--
    
    
        window.onload = function() {
         
    
            var width,height,new_x,new_y;
    
    
            // New width/height
            width = 640;
            height = 440;
    
            // Set the new x/y values for the window
            // This will move the window to the center of the screen
            new_x = ((screen.availWidth / 2)- (width / 2));
            new_y = ((screen.availHeight / 2) - (height / 2))
    
            // Resize the window and move it to the center of the screen
            window.resizeTo(width,height);
            window.moveTo(new_x,new_y);
    
    
    }
    -->
    </script>
    
    
    
    
    </head>
    
    <body>
    s
    </body>
    </html>

  2. #2
    may be this will helps you to open a page on page load

    &lt;body onload="javascript:window.open('sample.htm',' ','width=500,height=400,menubar=yes,toolbar=yes,sc rollbars=yes,resize=yes,addressbar=yes')"&gt;

  3. #3
    792
    posts
    She Bangs! She Bangs!
    i don't want to open a page on page load. i'm trying to modify THE page onLoad.

  4. #4
    On netscape you can change some of the properties (scrollbar, personalbar, locationbar, statusbar) through their .visible property. False to hide, true to show:
    Code:
    window.locationbar.visible=false;

  5. #5
    792
    posts
    She Bangs! She Bangs!
    is there anyway to do this cross-browser???

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012