Results 1 to 2 of 2

Thread: a little assistance please

  1. #1
    Join Date
    Sep 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question a little assistance please

    hello, i have a button that opens a new page full screen but i would like the button to also close the first window whilst it still opens the new window, please can you tell me how to do this, i tried this already

    <form>
    <input type="button" onClick="window.close(),fullwin('link goes here')" value="ENTER HERE"> </p>
    </form>

    it seems to work when its on my pc, but as soon as i upload it, it wont work, what am i doing wrong, or is there another way

    LJ

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Solution

    Hi LJ,

    Use this code instead, it works fine in IExplorer.

    Code:
    <script>
    function go() {
    window.close();
    window.open("http://www.website.com", '', 'fullscreen=yes, menubar=1, toolbar=1, scrollbars=1');
    }
    </script>
    
    <input type="button" onClick="go();" value="ENTER HERE"> </p>
    This script should work for all javascript browsers. Replace website.com with your desired target page.

    Here's a description of different variables you can use to customize a new window. Put these if required where the variables menubar=1 etc are, separate them with a comma.

    width (number) = The width of the new window in pixels
    height (number) = The height of the new window in pixels
    left (number) = The location where the left side of the window should appear
    top (number) = The location where the top of the window should appear
    location (yes/no) = Controls whether the browser should display the browser r
    menubar (yes/no) = Controls whether the browser should display the menu bar
    resizable (yes/no) = Allows the user to resize the browser window
    scrollbars (yes/no) = Controls whether horizontal or vertical scrollbars are shown
    status (yes/no) = Controls the display of the status bar (the area at the bottom of the browser)
    toolbar (yes/no) = Controls whether the browser should display the toolbar that contains the back/forward/etc buttons
    fullscreen (yes/no) = If yes, opens the window to the full size of the screen. [IE 4+ only]

    Hope this helps
    cr3ative
    Last edited by cr3ative; 09-04-2004 at 06:19 PM. Reason: added a variable table
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

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
  •