Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Close a window when it loses focus

Reply
Thread Tools

Close a window when it loses focus

 
 
Fernie
Guest
Posts: n/a
 
      12-01-2004
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
 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      12-01-2004
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
 
Reply With Quote
 
 
 
 
Fernie
Guest
Posts: n/a
 
      12-01-2004
"Mark Parnell" <> wrote in message
news: m.au...
> 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
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-01-2004
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.


 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      12-01-2004
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
 
Reply With Quote
 
Karl Core
Guest
Posts: n/a
 
      12-01-2004

"Fernie" <Fernie@not_thisDocSignings.net> wrote in message
news:BF733DB637B6E240Fernie@not_thisDocSignings.ne t...
>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?...&item=boneyard


 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      12-01-2004
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.


 
Reply With Quote
 
Starshine Moonbeam
Guest
Posts: n/a
 
      12-01-2004
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









 
Reply With Quote
 
Fernie
Guest
Posts: n/a
 
      12-01-2004
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
 
Reply With Quote
 
Fernie
Guest
Posts: n/a
 
      12-01-2004
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.ne t...
>>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?...&item=boneyard
>




--

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) Iñaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
close all child windows when close the main window jrefactors@hotmail.com HTML 6 08-07-2008 09:10 AM
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
close current window using window.close() Shang Wenbin Javascript 10 09-02-2005 12:16 AM
Popup window loses focus alert Colin Graham Javascript 1 04-19-2005 03:30 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57