Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pop up window help

    hi everyone...

    i need help with pop-up windows... i use the following line of code to create pop ups, but only one can be open at a time:

    <a href="tessa.html" ONCLICK="window.open('tessa.html', 'popup', 'width=440,height=520'); return false">

    the window opens fine, but the viewer must close this window before they can open another one, and unfortunately, not every viewer realizes this b/c if they click on the main screen, the pop up moves to the background, and thuis "is gone" to the average viewer...

    soo.... is there something i can do to allow more that one pop-up window be on the sctreen at one time....

    thanks, i appreciate all your help!

    PS: how do they make those cool colored scroll bars on this site (and many other recently)?? does anyopne know?

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Colorado
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The scrollbars are done using CSS. You can find a tutorial on them at http://javascriptkit.com/howto/scrollbarcolor.shtml
    -Sk8er9547

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    London
    Posts
    220
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Scrollbar - just change the hex colours, and paste into <head> here </head> tags.

    <STYLE type="text/css">
    <!--
    BODY {
    scrollbar-face-color:#FFFFFF;
    scrollbar-highlight-color:#FFFFFF;
    scrollbar-3dlight-color:#FFFFFF;
    scrollbar-darkshadow-color:#FFFFFF;
    scrollbar-shadow-color:#FFFFFF;
    scrollbar-arrow-color:#000000;
    scrollbar-track-color:#FFFFFF;
    }
    -->
    </STYLE>

    Doesn't work in older browsers.

    Mxx
    "Imagination is more important than knowledge" A. Einstein's 'Twin Paradox'

  • #4
    Regular Coder
    Join Date
    May 2002
    Location
    Maine, USA
    Posts
    573
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can keep your pop-up from going behind your main window by adding the following to the <body> tag of the htm(l) file that loads into the pop-up (one way to do it):

    <body onBlur="this.focus();">

    For more information on controlling your pop-up windows, here's a link you might want to follow:

    http://tech.irt.org/articles/js205/index.htm
    Last edited by boxer_1; 07-11-2002 at 04:00 PM.
    boxer_1
    CodingForums Moderator
    "How did a fool and his money get together in the first place?"

  • #5
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    403
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you were using a function to open your windows, you could also include a check to see if the named child is not closed, and if so then focus the child (bring it to the front). Also, you could do <body onblur="self.close();"> in your child window which would cause the window to close each time the child window was removed from the front of the view (focus), but this could cause problems depending on what you want to happen in the child window (forms, link clicking, etc.).
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #6
    New to the CF scene
    Join Date
    Sep 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Same problems

    After much searching, I have found that below is the only way I can open a pop-up window on my page...
    <a href="http://www.sharonmorrowdesigns.com/sterling_rings/strrng301.htm" onClick="window.open(this. href,'Sterling','scrollbars=no,width=275,height=375'); return false"

    ...much like the coding by fluid01. I have numerous pages that need to be opened and have trying using functions, and for some reason, they will not open my new pages. I would like to keep the windows on top, with content changing. I have tried to place the focus information in the new window, but that keeps that page on top, not just the window. How do I keep the window on top using the script I have above? Is it possible?


  •  

    Posting Permissions

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