How to child window always ontop

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Cortes

    How to child window always ontop

    Hi all,

    I have this parent window poping up the child window. SOmething like this

    popupWinA= window.open("ch ild.html","popu pWinA"," width=300 , height=150)

    I want this child popupWinA always stay on top of the parent window no
    matter where the focus is (so that when you click the parent, the child
    doesn't *disappear* because if its small size).

    Is there any way to do this?
    any reply will be greatly appreciated. Thanks

    Wish you all have a good day!


  • Markus Ernst

    #2
    Re: How to child window always ontop

    "Cortes" <tvhoang1980@ya hoo.com> schrieb im Newsbeitrag
    news:40c55b34@d uster.adelaide. on.net...[color=blue]
    > Hi all,
    >
    > I have this parent window poping up the child window. SOmething like this
    >
    > popupWinA= window.open("ch ild.html","popu pWinA"," width=300 , height=150)
    >
    > I want this child popupWinA always stay on top of the parent window no
    > matter where the focus is (so that when you click the parent, the child
    > doesn't *disappear* because if its small size).
    >
    > Is there any way to do this?[/color]

    I don't think so. You can add onBlur="self.fo cus()" to the small window's
    document's body tag, but of course the parent window will loose focus then.
    If the information in the small window has to be always visible you will
    have to redesign your site and include that information in the parent's
    documents. Like that you also avoid all popup-related problems.

    For a lot of cases the task is not actually that the popup stays visible but
    that it should regain focus when reloaded (i.e. for slide shows or
    whatever). You can achieve that with onLoad="self.fo cus()", or by closing it
    when it gets behind the parent window (onBlur="self.c lose()").

    If you are a frequent newsgroup user you know of course that the best way is
    avoiding popups at all.

    HTH
    Markus


    Comment

    • Cortes

      #3
      Re: How to child window always ontop

      Thanks Markus, much appreciated!

      My popup is something like the finder popup in Microsoft Internet Explorer.
      So it had better stay visible all the time.

      I just found out in Netscape 4.0 you have something like

      popup=window.op en("child.html" ,"child", alwaysRaised= yes);

      which will make the child always floats ontop no matter if it is active or
      not.

      However, Microsoft IE doesn't support it :(. I don't know if there is a
      workaround?

      I wish you all a very good day!


      Comment

      • Vincent van Beveren

        #4
        Re: How to child window always ontop

        > which will make the child always floats ontop no matter if it is[color=blue]
        > active or not.
        >
        > However, Microsoft IE doesn't support it :(. I don't know if there is
        > a workaround?[/color]

        What you are looking for is the following:
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


        And play with it here:
        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


        Though only supported by MS ofcourse :) but I'm sure there are solutions
        for mozilla.

        Good luck,
        Vincent


        Comment

        • DU

          #5
          Re: How to child window always ontop

          Cortes wrote:
          [color=blue]
          > Hi all,
          >
          > I have this parent window poping up the child window. SOmething like this
          >
          > popupWinA= window.open("ch ild.html","popu pWinA"," width=300 , height=150)
          >
          > I want this child popupWinA always stay on top of the parent window no
          > matter where the focus is (so that when you click the parent, the child
          > doesn't *disappear* because if its small size).
          >
          > Is there any way to do this?
          > any reply will be greatly appreciated. Thanks
          >
          > Wish you all have a good day!
          >
          >[/color]

          1- The 3rd argument in the window.open call is a string (between a pair
          of quotes) without any blank space in it, otherwise, NS 6+ and
          Mozilla-based browsers will not comply with the specifications requested
          in the windowFeatures list.

          2- alwaysRaised requires enhanced security privileges in NS 4, NS 6+ and
          Mozilla-based browsers

          3- I strongly advised against onblur="self.fo cus();" which will confuse
          users and abuse their system resources. I'm absolutely convinced there
          can be a better way, a more user-friendly way to achieve what you want
          if only you would elaborate on your webpage design goals, requirements.

          Modal solutions (like showModalDialog and showModelessDia log) are
          extreme solutions which, when improperly, unjustifiably used, often
          alienate users than anything. At the very least, you should always give
          some kind of veto power to your users if they want to turn off your
          "finder popup". Be aware that power Mozilla users will know how to
          neutralize an inflexible modal popup while others can always use the
          back button or the close window button of their browser on your site.

          DU

          Comment

          • Kien

            #6
            Re: How to child window always ontop

            Hi,
            All other posts have correctly advised you about the use and abuse of pop-ups.
            I would suggest a back on top interval.

            <body onload='setInte rval("self.focu s()",1500);'>

            Hopefully this would pop the pop up back every 1.5 secs or so
            if it happens to lose focus.

            Kien

            DU <drunclear@hotW IPETHISmail.com > wrote in message news:<ca4kgo$gt m$1@news.eusc.i nter.net>...[color=blue]
            > Cortes wrote:
            >[color=green]
            > > Hi all,
            > >
            > > I have this parent window poping up the child window. SOmething like this
            > >
            > > popupWinA= window.open("ch ild.html","popu pWinA"," width=300 , height=150)
            > >
            > > I want this child popupWinA always stay on top of the parent window no
            > > matter where the focus is (so that when you click the parent, the child
            > > doesn't *disappear* because if its small size).
            > >
            > > Is there any way to do this?
            > > any reply will be greatly appreciated. Thanks
            > >
            > > Wish you all have a good day!
            > >[/color][/color]

            Comment

            • Markus Ernst

              #7
              Re: How to child window always ontop

              "Kien" <caoxuankien@ho tmail.com> schrieb im Newsbeitrag
              news:166d5d19.0 406082029.7d6a1 048@posting.goo gle.com...[color=blue]
              > Hi,
              > All other posts have correctly advised you about the use and abuse of[/color]
              pop-ups.[color=blue]
              > I would suggest a back on top interval.
              >
              > <body onload='setInte rval("self.focu s()",1500);'>
              >
              > Hopefully this would pop the pop up back every 1.5 secs or so
              > if it happens to lose focus.[/color]

              Huh... imagine the user is actually scrolling, reading some text, or filling
              in a form at the moment the popup is coming back to the top... there are
              less things on the web that are more confusing than unexpectedly opened
              windows.

              Markus


              Comment

              Working...