Two very different window.blur() results

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

    #1

    Two very different window.blur() results

    http://home.nycap.rr.com/foryorisonly/site.htm

    The top one is very different from the bottom one. If you do not recognize the difference
    scroll the images to the right. Not that the toolbar File | View is enabled for the top blured
    window and disabled for the bottom.

    These are the same exact windows both blured using window.blur(); How is it done?
    Well to tell you the truth I'd prefer it NOT to happen. I am expecting a window.blur() to give
    the bottom window. Not the top. But yes that is the behavior I am getting.

    When I use window.blur() can you suggest any way so that the top one never occurs?

    The code is this:

    <script type="text/javascript">
    window.onblur = window_onblur;
    function window_onblur() {
    window.blur();
    }
    </script>

    --
    George Hester
    _______________ _______________ ____
  • Randy Webb

    #2
    Re: Two very different window.blur() results

    George Hester wrote:[color=blue]
    > http://home.nycap.rr.com/foryorisonly/site.htm
    >
    > The top one is very different from the bottom one. If you do not recognize the difference
    > scroll the images to the right. Not that the toolbar File | View is enabled for the top blured
    > window and disabled for the bottom.
    >
    > These are the same exact windows both blured using window.blur(); How is it done?
    > Well to tell you the truth I'd prefer it NOT to happen. I am expecting a window.blur() to give
    > the bottom window. Not the top. But yes that is the behavior I am getting.
    >
    > When I use window.blur() can you suggest any way so that the top one never occurs?
    >
    > The code is this:
    >
    > <script type="text/javascript">
    > window.onblur = window_onblur;
    > function window_onblur() {
    > window.blur();
    > }
    > </script>
    >[/color]

    That is a very good example of what you get - unpredictable results -
    when you duplicate what the browser is doing. When the window gets
    blurred, it has to regain focus and then blur itself, to get back where
    you were to start with.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq
    Answer:It destroys the order of the conversation
    Question: Why?
    Answer: Top-Posting.
    Question: Whats the most annoying thing on Usenet?

    Comment

    • George Hester

      #3
      Re: Two very different window.blur() results


      "Randy Webb" <HikksNotAtHome @aol.com> wrote in message news:w8GdnQ54N6 MVye3cRVn-2w@comcast.com. ..[color=blue]
      > George Hester wrote:[color=green]
      > > http://home.nycap.rr.com/foryorisonly/site.htm
      > >
      > > The top one is very different from the bottom one. If you do not recognize the difference
      > > scroll the images to the right. Not that the toolbar File | View is enabled for the top blured
      > > window and disabled for the bottom.
      > >
      > > These are the same exact windows both blured using window.blur(); How is it done?
      > > Well to tell you the truth I'd prefer it NOT to happen. I am expecting a window.blur() to give
      > > the bottom window. Not the top. But yes that is the behavior I am getting.
      > >
      > > When I use window.blur() can you suggest any way so that the top one never occurs?
      > >
      > > The code is this:
      > >
      > > <script type="text/javascript">
      > > window.onblur = window_onblur;
      > > function window_onblur() {
      > > window.blur();
      > > }
      > > </script>
      > > [/color]
      >
      > That is a very good example of what you get - unpredictable results -
      > when you duplicate what the browser is doing. When the window gets
      > blurred, it has to regain focus and then blur itself, to get back where
      > you were to start with.
      >
      > --
      > Randy
      > comp.lang.javas cript FAQ - http://jibbering.com/faq
      > Answer:It destroys the order of the conversation
      > Question: Why?
      > Answer: Top-Posting.
      > Question: Whats the most annoying thing on Usenet?[/color]

      Thanks Randy:
      It's actually helpful this behavior in what I am doing but I don't like it. It seems to me if the Window is blurred once then when it is blurred again it should exhibit the same behavior as it did the first time it was blurred. But I am finding that not to be the case. This does happen with consistency. The file menu will enable 1 3 5 7 and the other 2 4 6 8. It's a toggle. Too bad I can't use javascript to make the toggle skip a beat???

      "When the window gets blrred..." follow you there. "...it has to regain focus..." - right that's what is happening by clicking on the title bar - ".."and then blur itself" - ah so that regaining focus only to immediately blur again causes this behavior. Is this just a Microsoft Internet Explorer issue or do other browsers exhibit similar behavior using window.blur()?

      --
      George Hester
      _______________ _______________ ____

      Comment

      • Randy Webb

        #4
        Re: Two very different window.blur() results

        George Hester wrote:[color=blue]
        > Thanks Randy:
        > It's actually helpful this behavior in what I am doing but I don't like it.
        > It seems to me if the Window is blurred once then when it is blurred again it
        > should exhibit the same behavior as it did the first time it was blurred. But
        > I am finding that not to be the case. This does happen with consistency. The
        > file menu will enable 1 3 5 7 and the other 2 4 6 8. It's a toggle. Too bad
        > I can't use javascript to make the toggle skip a beat???[/color]

        Maybe you could double blur it. Just double the code you have now. That
        should cause it - theoretically - to skip a beat.
        [color=blue]
        > "When the window gets blrred..." follow you there. "...it has to regain focus..."
        > - right that's what is happening by clicking on the title bar - ".."and then blur
        > itself" - ah so that regaining focus only to immediately blur again causes this
        > behavior. Is this just a Microsoft Internet Explorer issue or do other browsers
        > exhibit similar behavior using window.blur()?[/color]

        I can't even get IE to duplicate that behavior. But Mozilla doesn't
        display that behaovior either.

        --
        Randy
        comp.lang.javas cript FAQ - http://jibbering.com/faq

        Comment

        • George Hester

          #5
          Re: Two very different window.blur() results


          "Randy Webb" <HikksNotAtHome @aol.com> wrote in message news:n_OdnRo3Et ej6e3cRVn-ig@comcast.com. ..[color=blue]
          > George Hester wrote:[color=green]
          > > Thanks Randy:
          > > It's actually helpful this behavior in what I am doing but I don't like it.
          > > It seems to me if the Window is blurred once then when it is blurred again it
          > > should exhibit the same behavior as it did the first time it was blurred. But
          > > I am finding that not to be the case. This does happen with consistency. The
          > > file menu will enable 1 3 5 7 and the other 2 4 6 8. It's a toggle. Too bad
          > > I can't use javascript to make the toggle skip a beat???[/color]
          >
          > Maybe you could double blur it. Just double the code you have now. That
          > should cause it - theoretically - to skip a beat.
          > [color=green]
          > > "When the window gets blrred..." follow you there. "...it has to regain focus..."
          > > - right that's what is happening by clicking on the title bar - ".."and then blur
          > > itself" - ah so that regaining focus only to immediately blur again causes this
          > > behavior. Is this just a Microsoft Internet Explorer issue or do other browsers
          > > exhibit similar behavior using window.blur()?[/color]
          >
          > I can't even get IE to duplicate that behavior. But Mozilla doesn't
          > display that behaovior either.
          >
          > --
          > Randy
          > comp.lang.javas cript FAQ - http://jibbering.com/faq[/color]

          OK I will try to put together a working exhibition of this behavior this weekend and I'll post it back here. If you
          do not have access to either IE 5 or IE 5.5 then you won't see it. It doesn't happen in IE 6. It might you just
          cannot see it.

          It's funny that you mention "doubling up the code" because that is in fact what I did to make this
          experiemnt work in the first place. This is the best I can do and now I'm stumped. I never expected
          the only shortoming in this to be a toggling file menu.

          But like I said it is sort of a saving grace. Because without it I wouldn't be able to View | Refresh. And no
          F5 won't do nothing. Remember it is out of focus.

          --
          George Hester
          _______________ _______________ ____

          Comment

          Working...