Go Back   Velocity Reviews > Newsgroups > HTML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

HTML - Close a window when it loses focus

 
Thread Tools Search this Thread
Old 12-01-2004, 12:47 AM   #1
Default Close a window when it loses focus


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
  Reply With Quote
Old 12-01-2004, 12:52 AM   #2
Mark Parnell
 
Posts: n/a
Default Re: Close a window when it loses focus

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
Old 12-01-2004, 01:06 AM   #3
Fernie
 
Posts: n/a
Default Re: Close a window when it loses focus

"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
Old 12-01-2004, 01:07 AM   #4
rf
 
Posts: n/a
Default Re: Close a window when it loses focus

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
Old 12-01-2004, 01:11 AM   #5
Mark Parnell
 
Posts: n/a
Default Re: Close a window when it loses focus

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
Old 12-01-2004, 01:16 AM   #6
Karl Core
 
Posts: n/a
Default Re: Close a window when it loses focus


"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
Old 12-01-2004, 01:31 AM   #7
rf
 
Posts: n/a
Default Re: Close a window when it loses focus

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
Old 12-01-2004, 01:46 AM   #8
Starshine Moonbeam
 
Posts: n/a
Default Re: Close a window when it loses focus

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
Old 12-01-2004, 05:39 AM   #9
Fernie
 
Posts: n/a
Default Re: Close a window when it loses focus

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
Old 12-01-2004, 05:39 AM   #10
Fernie
 
Posts: n/a
Default Re: Close a window when it loses focus

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 Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump