Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    May 2003
    Posts
    7
    Member #
    1498
    Hi

    I am using the following code, and don't know where to add in the code that removes toolbars etc.. and also specifies the dimensions of the new popup window. The code is this:

    <script language="javascript">
    function setCookie(name, value) {
    document.cookie = name + '=' + escape(value) + ';';
    }
    function getCookie(name) {
    var cookies = document.cookie;
    var a = cookies.indexOf(name + '=');
    if (a == -1) return null;
    a = cookies.indexOf('=', a) + 1;
    var b = cookies.indexOf(';', a);
    b = (b == -1) ? cookies.length : b;
    return unescape(cookies.substring(a, b));
    }
    function pop() {
    if (getCookie('stopPop') != 1) {
    window.open('popup.html');
    setCookie('stopPop', 1);
    }
    }
    </script>

    <body onload="pop()">
    </body>


    Any help is appreciated.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Code:
    handle = window.open("popup.html", "toolbar=no");
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    you can also try:
    Code:
    handle = window.showModalDialog('popup.html', null, 'dialogWidth: 400px; dialogHeight: 300px');
    or something along those lines.

    The Modal Dialog opens by default with no toolbar, status bar, or resize allowed.

    It also opens as a modal child of the current window, which means that the user MUST close it before returning to the parent window. It's pretty neat functionality, and useful for presenting heirarchical forms


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:24 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com