Alert messages + counters

C

clarket

Hi,

I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically.

E.g "You will be logged out in x seconds. Do you want to stay logged
in. Yes No"

where the x value would count down and if they didn't press yes then
they would be redirected to another page to log then out.

Thanks,

Tony.
 
T

Thomas 'PointedEars' Lahn

clarket said:
I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically. [...]

No, it is not, so you will have to implement it yourself. Keep in mind
that popup blockers usually block popups that were not requested by the
user.


PointedEars
 
R

Randy Webb

Thomas 'PointedEars' Lahn said the following on 12/14/2005 9:28 AM:
clarket wrote:

I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically. [...]


No, it is not, so you will have to implement it yourself. Keep in mind
that popup blockers usually block popups that were not requested by the
user.

Who said anything about popups? Popup blockers do not normally block
window.confirm. I say normally because there may be a 3rd rate blocker
in a 3rd world country that does but most decent blockers do not.
 
T

Tony

Randy said:
Thomas 'PointedEars' Lahn said the following on 12/14/2005 9:28 AM:
clarket wrote:

I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically. [...]


No, it is not, so you will have to implement it yourself. Keep in mind
that popup blockers usually block popups that were not requested by the
user.

Who said anything about popups? Popup blockers do not normally block
window.confirm. I say normally because there may be a 3rd rate blocker
in a 3rd world country that does but most decent blockers do not.

So, how do you get a countdown timer in window.confirm, as the OP asked?
 
R

Randy Webb

Tony said the following on 12/14/2005 1:11 PM:
Randy said:
Thomas 'PointedEars' Lahn said the following on 12/14/2005 9:28 AM:
clarket wrote:



I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically. [...]


No, it is not, so you will have to implement it yourself. Keep in mind
that popup blockers usually block popups that were not requested by the
user.

Who said anything about popups? Popup blockers do not normally block
window.confirm. I say normally because there may be a 3rd rate blocker
in a 3rd world country that does but most decent blockers do not.


So, how do you get a countdown timer in window.confirm, as the OP asked?

You don't. window.confirm is not dynamic. Meaning, you can't change its
contents without dismissing it and then reopening another.

What you can do is to have an "in window popup" which is just a simple
div layer that sits on top of the page. You set one div over the entire
page that is transparent. Then, you have another that sits on top of
that one. The uppermost one is nothing but a fancy div.

<URL: http://www.litotes.demon.co.uk/js_info/pop_ups.html >

Is one that Richard Cornford did. You simply put a timer countdown in
the div tag and you are all set.
 
T

Thomas 'PointedEars' Lahn

Randy said:
Tony said the following on 12/14/2005 1:11 PM:
Randy said:
Thomas 'PointedEars' Lahn said the following on 12/14/2005 9:28 AM:
clarket wrote:
I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically. [...]
No, it is not, so you will have to implement it yourself. Keep in mind
that popup blockers usually block popups that were not requested by the
user.
[the usual babbling]
So, how do you get a countdown timer in window.confirm, as the OP asked?

You don't. window.confirm is not dynamic. Meaning, you can't change
its contents without dismissing it and then reopening another.

What you can do is to have an "in window popup" which is just a simple
div layer that sits on top of the page. [...]

Did it occur to you that I mentioned popup blockers for a
reason, or are you deliberately making a fool of yourself?


PointedEars
 
R

Randy Webb

Thomas 'PointedEars' Lahn said the following on 12/14/2005 2:10 PM:
Randy Webb wrote:

Tony said the following on 12/14/2005 1:11 PM:
Randy Webb wrote:

Thomas 'PointedEars' Lahn said the following on 12/14/2005 9:28 AM:

clarket wrote:

I was wondering if it was possible to have a variable count down in a
window.confirm dialog box. Like the type of message some systems have
to log users out automatically. [...]

No, it is not, so you will have to implement it yourself. Keep in mind
that popup blockers usually block popups that were not requested by the
user.

[the usual babbling]

So, how do you get a countdown timer in window.confirm, as the OP asked?

You don't. window.confirm is not dynamic. Meaning, you can't change
its contents without dismissing it and then reopening another.

What you can do is to have an "in window popup" which is just a simple
div layer that sits on top of the page. [...]


Did it occur to you that I mentioned popup blockers for a
reason,

Yes, but your reasoning defies those of us with reasoning abilities.
Of course, had you properly explained yourself it would have been
self-evident.

There is *NO* need for a popup so to even mention it is foolish.

or are you deliberately making a fool of yourself?

No thanks, I will leave that honor to you since you are so good at it.
 
T

Tony

Randy said:
Thomas 'PointedEars' Lahn said the following on 12/14/2005 2:10 PM:
Randy said:
Tony said the following on 12/14/2005 1:11 PM:

So, how do you get a countdown timer in window.confirm, as the OP asked?

You don't. window.confirm is not dynamic. Meaning, you can't change
its contents without dismissing it and then reopening another.

What you can do is to have an "in window popup" which is just a simple
div layer that sits on top of the page. [...]

Did it occur to you that I mentioned popup blockers for a
reason,

Yes, but your reasoning defies those of us with reasoning abilities.
Of course, had you properly explained yourself it would have been
self-evident.

There is *NO* need for a popup so to even mention it is foolish.

Perhaps he was making the point that usnig a popup (which would be one
of the first thoughts to occur to a relatively new javascript
programmer) was not the best of all choices?

Hmmm - one wonders...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top