Web Analytics Made Easy -
StatCounter pop up window help - CodingForum


No announcement yet.

pop up window help

  • Filter
  • Time
  • Show
Clear All
new 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
    The scrollbars are done using CSS. You can find a tutorial on them at http://javascriptkit.com/howto/scrollbarcolor.shtml


    • #3
      Scrollbar - just change the hex colours, and paste into <head> here </head> tags.

      <STYLE type="text/css">
      BODY {

      Doesn't work in older browsers.

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


      • #4
        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:

        Last edited by boxer_1; Jul 11, 2002, 11:00 AM.
        CodingForum Moderator
        "How did a fool and his money get together in the first place?"


        • #5
          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
            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?