SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need a Status Bar

    I have the code below, and I want to know where and how do I make a status window appear on the pop-up window it generates:

    <script type="text/javascript" language="JavaScript">

    // Centered Pop-Up Window (v1.0)
    // (C) 2002 www.smileycat.com
    // Free for all users, but leave in this header

    var win = null;
    function newWindow(mypage,myname,w,h,features) {
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
    if (winl < 0) winl = 0;
    if (wint < 0) wint = 0;
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    win = window.open(mypage,myname,settings);
    win.window.focus();
    }

    </script>


    Thank you.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    settings += 'status=1';

    References for window.open:

    Netscape

    Microsoft

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Mike. Thanks for the response, but I'm not sure what you mean by it. I don't know where in the code to put whatever I need to make a status bar appear. I don't know where to put settings += 'status=1';, for instance. I have no idea where that goes.

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2003
    Location
    Maryland, USA
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Add it to the string when you are setting your 'settings' variable.

    Code:
    var settings = 'height=' + h + ',';
    settings += 'width=' + w + ',';
    settings += 'top=' + wint + ',';
    settings += 'left=' + winl + ',';
    settings += features;
    settings += ', status=1';

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2003
    Location
    Michigan
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Daniel, that worked great. Thanks!


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
  •