Close a window when it loses focus

Discussion in 'HTML' started by Fernie, Dec 1, 2004.

  1. Fernie

    Fernie Guest

    I have a url that opens a sized popup when clicked.

    Is it possible to embed the popup's html with javascript so that it
    automatically closes itself when focus is lost?

    Anyway, I looked at onfocus() and was hoping to find something like
    onfocusLost()...

    Thank you.



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #1
    1. Advertising

  2. Fernie

    Mark Parnell Guest

    Previously in alt.html, Fernie <Fernie@not_thisDocSignings.net> said:

    > I have a url that opens a sized popup when clicked.


    Not here it doesn't.

    > Is it possible to embed the popup's html with javascript so that it
    > automatically closes itself when focus is lost?


    Possible, yes. Will it work? Maybe. Sometimes. But is that what the user
    wants? Then again, does the user want the popup in the first place?
    Probably not.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Dec 1, 2004
    #2
    1. Advertising

  3. Fernie

    Fernie Guest

    "Mark Parnell" <> wrote in message
    news:...
    > Previously in alt.html, Fernie <Fernie@not_thisDocSignings.net> said:
    >
    >> I have a url that opens a sized popup when clicked.

    >
    > Not here it doesn't.
    >
    >> Is it possible to embed the popup's html with javascript so that it
    >> automatically closes itself when focus is lost?

    >
    > Possible, yes. Will it work? Maybe. Sometimes. But is that what the user
    > wants? Then again, does the user want the popup in the first place?
    > Probably not.
    >
    > --
    > Mark Parnell


    Hi, I found the right method, onBlur(). Anyway, the popup is opened when
    the user clicks on a url and not automatically when they go to my page; so I
    am guessing (and would hope) that it would open on your system, unless you
    have javascript disabled.

    Best Regards,

    Fernie



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #3
  4. Fernie

    rf Guest

    Fernie wrote

    > I have a url that opens a sized popup when clicked.


    No you don't. At least you don't on any of my browsers. What is wrong with
    simply using the window I have already provided you with?

    > Is it possible to embed the popup's html with javascript so that it
    > automatically closes itself when focus is lost?


    Possibly.

    > Anyway, I looked at onfocus() and was hoping to find something like
    > onfocusLost()...


    I'll bet you didn't find it :)

    You should have been looking for onBlur.

    --
    Cheers
    Richard.
     
    rf, Dec 1, 2004
    #4
  5. Fernie

    Mark Parnell Guest

    Previously in alt.html, Fernie <Fernie@not_thisDocSignings.net> said:

    > Hi, I found the right method, onBlur(). Anyway, the popup is opened when
    > the user clicks on a url and not automatically when they go to my page; so I
    > am guessing (and would hope) that it would open on your system, unless you
    > have javascript disabled.


    Then you would guess (and hope) wrong. My browser will not allow any new
    window to open unless I specifically tell it to. As it should. If I want
    a new window opened, I will do it myself.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Dec 1, 2004
    #5
  6. Fernie

    Karl Core Guest

    "Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    news:BF733DB637B6E240Fernie@not_thisDocSignings.net...
    >I have a url that opens a sized popup when clicked.
    >
    > Is it possible to embed the popup's html with javascript so that it
    > automatically closes itself when focus is lost?
    >
    > Anyway, I looked at onfocus() and was hoping to find something like
    > onfocusLost()...
    >


    Even better - don't open the popup.
    http://karlcore.com/articles/article.php?id=25

    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
     
    Karl Core, Dec 1, 2004
    #6
  7. Fernie

    rf Guest

    Fernie wrote:

    > Anyway, the popup is opened when
    > the user clicks on a url and not automatically when they go to my page; so

    I
    > am guessing (and would hope) that it would open on your system, unless you


    It still will not open on my system, unless I specifically allow it to.

    > have javascript disabled.


    Nope.

    --
    Cheers
    Richard.
     
    rf, Dec 1, 2004
    #7
  8. In article <BF733DB637B6E240Fernie@not_thisDocSignings.net>, Fernie
    (Fernie@not_thisDocSignings.net) dropped a +5 bundle of words...

    > I have a url that opens a sized popup when clicked.
    >
    > Is it possible to embed the popup's html with javascript so that it
    > automatically closes itself when focus is lost?
    >
    > Anyway, I looked at onfocus() and was hoping to find something like
    > onfocusLost()...


    onBlur


    --
    Starshine Moonbeam
    mhm31x9 Smeeter#29 WSD#30
    sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM
     
    Starshine Moonbeam, Dec 1, 2004
    #8
  9. Fernie

    Fernie Guest

    Thank you, and everyone else who responded.

    Best Regards,

    Fernie


    "Starshine Moonbeam" <> wrote in message
    news:...
    > In article <BF733DB637B6E240Fernie@not_thisDocSignings.net>, Fernie
    > (Fernie@not_thisDocSignings.net) dropped a +5 bundle of words...
    >
    >> I have a url that opens a sized popup when clicked.
    >>
    >> Is it possible to embed the popup's html with javascript so that it
    >> automatically closes itself when focus is lost?
    >>
    >> Anyway, I looked at onfocus() and was hoping to find something like
    >> onfocusLost()...

    >
    > onBlur
    >
    >
    > --
    > Starshine Moonbeam
    > mhm31x9 Smeeter#29 WSD#30
    > sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM
    >
    >
    >
    >
    >
    >
    >
    >
    >




    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #9
  10. Fernie

    Fernie Guest

    I read your article and I really don't think that there is anything wrong
    with an inoffensive little popup that display suppplimentary information on
    user demand.

    I'm helping a friend with a site and I'll tell you for a fact that people
    use our little popup windows like crazy. We used to take the visitor to a
    new page but this has changed and I truly feel that this provides the end
    user with a cleaner, more pleasant browsing experience.

    Best Regards,

    Fernie


    "Karl Core" <> wrote in message
    news:coj617$afd$...
    >
    > "Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    > news:BF733DB637B6E240Fernie@not_thisDocSignings.net...
    >>I have a url that opens a sized popup when clicked.
    >>
    >> Is it possible to embed the popup's html with javascript so that it
    >> automatically closes itself when focus is lost?
    >>
    >> Anyway, I looked at onfocus() and was hoping to find something like
    >> onfocusLost()...
    >>

    >
    > Even better - don't open the popup.
    > http://karlcore.com/articles/article.php?id=25
    >
    > --
    > -Karl Core
    > Please Support "Project Boneyard":
    > http://www.insurgence.net/info.aspx?action=band&item=boneyard
    >




    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #10
  11. Fernie

    Fernie Guest

    "rf" <rf@.invalid> wrote in message
    news:BP8rd.54107$...
    > Fernie wrote
    >> Anyway, I looked at onfocus() and was hoping to find something like
    >> onfocusLost()...

    >
    > I'll bet you didn't find it :)
    > You should have been looking for onBlur.


    Thanks. I don't think that you can get any more descriptive than onBlur.

    Best Regards,

    Fernie



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #11
  12. In article <CB3438153EB6E240Fernie@not_thisDocSignings.net>, "Fernie"
    <Fernie@not_thisDocSignings.net> wrote:

    > I'm helping a friend with a site and I'll tell you for a fact that people
    > use our little popup windows like crazy.


    It must be a popular site. They have no choice. Have you given them the
    opportunity to complain about those "crazy popup windows"?

    leo

    --
    <http://web0.greatbasin.net/~leo/>
     
    Leonard Blaisdell, Dec 1, 2004
    #12
  13. Fernie

    Fernie Guest

    "Leonard Blaisdell" <> wrote in message
    news:...
    > It must be a popular site. They have no choice. Have you given them the
    > opportunity to complain about those "crazy popup windows"?
    >
    > leo


    Leo, they are not unwanted "crazy popups". Think of it as being a planned
    birth, the innocent and inoffensive product of the user's browser triggered
    by a mouse click.



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #13
  14. Fernie

    rf Guest

    Fernie wrote:

    > Leo, they are not unwanted "crazy popups". Think of it as being a planned
    > birth, the innocent and inoffensive product of the user's browser

    triggered
    > by a mouse click.


    Please provide a URL to these offending popups :)

    --
    Cheers
    Richard.
     
    rf, Dec 1, 2004
    #14
  15. Fernie wrote:
    > Leo, they are not unwanted "crazy popups". Think of it as being a planned
    > birth, the innocent and inoffensive product of the user's browser triggered
    > by a mouse click.


    The user didn't ask for a popup window by clicking the link, they asked
    for a new page to open. The only time I want a new window is when I
    _specifically_ request it using my browser's context menu.

    > --
    >
    > ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com


    Empower your newsreader to send a broken signature separator, you mean?
    It should be "-- ", not "--".
     
    Leif K-Brooks, Dec 1, 2004
    #15
  16. Fernie

    Karl Core Guest

    "Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    news:CB3438153EB6E240Fernie@not_thisDocSignings.net...
    >
    >
    > "Karl Core" <> wrote in message
    > news:coj617$afd$...
    >>
    >> "Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    >> news:BF733DB637B6E240Fernie@not_thisDocSignings.net...
    >>>I have a url that opens a sized popup when clicked.
    >>>
    >>> Is it possible to embed the popup's html with javascript so that it
    >>> automatically closes itself when focus is lost?
    >>>
    >>> Anyway, I looked at onfocus() and was hoping to find something like
    >>> onfocusLost()...
    >>>

    >>
    >> Even better - don't open the popup.
    >> http://karlcore.com/articles/article.php?id=25
    >>
    >> --


    >I read your article and I really don't think that there is anything wrong
    >with an inoffensive little popup that display suppplimentary information on
    >user demand.
    >
    > I'm helping a friend with a site and I'll tell you for a fact that people
    > use our little popup windows like crazy. We used to take the visitor to a
    > new page but this has changed and I truly feel that this provides the end
    > user with a cleaner, more pleasant browsing experience.
    >


    You may have read it, but obviously didn't "get it".
    Users hate new windows of all kinds, regardless of how they're opened.
    This isn't conjecture, this is a fact which I have personally observed
    (repeatedly) in the usability lab.

    BTW - Stop top-posting


    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
     
    Karl Core, Dec 1, 2004
    #16
  17. Fernie

    SpaceGirl Guest

    Karl Core wrote:
    > "Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    > news:CB3438153EB6E240Fernie@not_thisDocSignings.net...
    >
    >>
    >>"Karl Core" <> wrote in message
    >>news:coj617$afd$...
    >>
    >>>"Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    >>>news:BF733DB637B6E240Fernie@not_thisDocSignings.net...
    >>>
    >>>>I have a url that opens a sized popup when clicked.
    >>>>
    >>>>Is it possible to embed the popup's html with javascript so that it
    >>>>automatically closes itself when focus is lost?
    >>>>
    >>>>Anyway, I looked at onfocus() and was hoping to find something like
    >>>>onfocusLost()...
    >>>>
    >>>
    >>>Even better - don't open the popup.
    >>>http://karlcore.com/articles/article.php?id=25
    >>>
    >>>--

    >
    >
    >>I read your article and I really don't think that there is anything wrong
    >>with an inoffensive little popup that display suppplimentary information on
    >>user demand.
    >>
    >>I'm helping a friend with a site and I'll tell you for a fact that people
    >>use our little popup windows like crazy. We used to take the visitor to a
    >>new page but this has changed and I truly feel that this provides the end
    >>user with a cleaner, more pleasant browsing experience.
    >>

    >
    >
    > You may have read it, but obviously didn't "get it".
    > Users hate new windows of all kinds, regardless of how they're opened.
    > This isn't conjecture, this is a fact which I have personally observed
    > (repeatedly) in the usability lab.
    >
    > BTW - Stop top-posting
    >
    >


    You speak for all users honey? That's nice.

    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Dec 1, 2004
    #17
  18. Fernie

    Karl Core Guest

    "SpaceGirl" <> wrote in message
    news:...
    > Karl Core wrote:
    >> "Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    >> news:CB3438153EB6E240Fernie@not_thisDocSignings.net...
    >>
    >>>
    >>>"Karl Core" <> wrote in message
    >>>news:coj617$afd$...
    >>>
    >>>>"Fernie" <Fernie@not_thisDocSignings.net> wrote in message
    >>>>news:BF733DB637B6E240Fernie@not_thisDocSignings.net...
    >>>>
    >>>>>I have a url that opens a sized popup when clicked.
    >>>>>
    >>>>>Is it possible to embed the popup's html with javascript so that it
    >>>>>automatically closes itself when focus is lost?
    >>>>>
    >>>>>Anyway, I looked at onfocus() and was hoping to find something like
    >>>>>onfocusLost()...
    >>>>>
    >>>>
    >>>>Even better - don't open the popup.
    >>>>http://karlcore.com/articles/article.php?id=25
    >>>>
    >>>>--

    >>
    >>
    >>>I read your article and I really don't think that there is anything wrong
    >>>with an inoffensive little popup that display suppplimentary information
    >>>on user demand.
    >>>
    >>>I'm helping a friend with a site and I'll tell you for a fact that people
    >>>use our little popup windows like crazy. We used to take the visitor to
    >>>a new page but this has changed and I truly feel that this provides the
    >>>end user with a cleaner, more pleasant browsing experience.
    >>>

    >>
    >>
    >> You may have read it, but obviously didn't "get it".
    >> Users hate new windows of all kinds, regardless of how they're opened.
    >> This isn't conjecture, this is a fact which I have personally observed
    >> (repeatedly) in the usability lab.
    >>
    >> BTW - Stop top-posting
    >>
    >>

    >
    > You speak for all users honey? That's nice.


    That is my job, cupcake.


    --
    -Karl Core
    Please Support "Project Boneyard":
    http://www.insurgence.net/info.aspx?action=band&item=boneyard
     
    Karl Core, Dec 1, 2004
    #18
  19. Fernie

    SpaceGirl Guest

    Karl Core wrote:

    >>You speak for all users honey? That's nice.

    >
    >
    > That is my job, cupcake.


    great


    --


    x theSpaceGirl (miranda)

    # lead designer @ http://www.dhnewmedia.com #
    # remove NO SPAM to email, or use form on website #
     
    SpaceGirl, Dec 1, 2004
    #19
  20. Fernie

    Fernie Guest

    "Karl Core" <> wrote in message
    news:cokdj1$42s$...
    >
    > BTW - Stop top-posting


    I really don't know what top posting means. My PC's date and time are set
    to my local date and time and I am replying to my original posts using OE.
    Or do you mean that I reply under the prior post as in this message?

    Best regards,

    Fernie



    --

    ELKNews FREE Edition - Empower your News Reader! http://www.atozedsoftware.com
     
    Fernie, Dec 1, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. - Steve -

    AutoPostBack on TextBox loses Focus

    - Steve -, Jun 29, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,545
    - Steve -
    Jun 29, 2004
  2. Iñaki Baz Castillo
    Replies:
    7
    Views:
    868
    Iñaki Baz Castillo
    Jan 12, 2010
  3. Colin Graham

    Popup window loses focus alert

    Colin Graham, Apr 19, 2005, in forum: Javascript
    Replies:
    1
    Views:
    158
    kaeli
    Apr 19, 2005
  4. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    378
    Gérard Talbot
    Sep 2, 2005
  5. Roger
    Replies:
    3
    Views:
    330
Loading...

Share This Page