SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    I'm a college yuppie now! sbdi's Avatar
    Join Date
    Jul 2000
    Location
    Dublin , Ireland
    Posts
    1,271
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Last one, Promise: Start-up window minus tb

    Hi,

    Sorry about all this! I'm developing an intranet application

    Anyways. Just to make it look slightly better, I want to remove toolbar etc.

    Now I know how to do this with onclick. But when I use onLoad it just doesnt work. I thought perhaps it was Visual studio.net

    But in notepad it doesnt work.


    Anyone got any links or tips or even basic syntax for it ?

    Thanks alot!
    Back Again

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check out the window.open() method. You can pass multiple parameters, one of which can turn off toolbars. Unfortunately you have to open a new window to do this. I don't know of a way to alter the settings of the current window.

  3. #3
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is no way to control the propterties of windows opened by the user! You can only modify window that were created by you the programmer! Want an example! Place this in the head of your document:

    Code:
    <script>
    window.close();
    </script>
    It should prompt you asking if you would like to close the window! Had you created that window it would have just closed no prompt!

    This is the syntax for opening a window onload!
    Code:
    window.onload=window.open("page.html","WinName","height=100,width=100,top=100,left=100,scrollbars=yes,toolbar=yes,location=yes" );

  4. #4
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Poop shoots method will not work.

    for one thing, you can force a window close, by doing the following:

    Code:
    window.opener = self;
    window.close();
    secondly, window.onload should be a pointer to a function, or be a function itself:

    Code:
    window.onload = function() {
       var openedWindow = window.open('page.html', 'winName', 'height=100, width=200, top=10, left=10, scrollbars=no, toolbar=no');
    };
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  5. #5
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok the window close one that is new to me!

    but this works fine for me

    Code:
    window.onload=window.open("page.html","WinName","height=100,width=100,top=100,left=100,scrollbars=yes,toolbar=yes,location=yes" );
    It may be the wrong syntax but it still works!

  6. #6
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well it will work, however it will open the window right when that appears in the code, instead of actually opening onload.

    (that and window.onload actually gets set to the new window's object)
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  7. #7
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Lange
    well it will work, however it will open the window right when that appears in the code, instead of actually opening onload.

    (that and window.onload actually gets set to the new window's object)
    Cool! Would these examples be better!

    Code:
    window.onload = function() {   var openedWindow = window.open('page.html', 'winName', 'height=100, width=200, top=10, left=10, scrollbars=no, toolbar=no');};
    Code:
    window.onload=openWin;
    function openWin() {   var openedWindow = window.open('page.html', 'winName', 'height=100, width=200, top=10, left=10, scrollbars=no, toolbar=no');};

  8. #8
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yup , those would work as desired.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.


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
  •