473,406 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Alert messages + counters

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.

Dec 14 '05 #1
8 1635
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.
PointedEars
Dec 14 '05 #2
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 14 '05 #3
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.


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?

Dec 14 '05 #4
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.


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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 14 '05 #5
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, or are you deliberately making a fool of yourself?
PointedEars
Dec 14 '05 #6
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.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Dec 14 '05 #7
Randy Webb wrote:
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:

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...

Dec 14 '05 #8
On 2005-12-14, clarket <cl*****@eircom.net> wrote:
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.


no, it's not.

some people have made their own on-page dialogs
with that method you can have timer driven content. (like a countdown)
Bye.
Jasen
Dec 15 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Darko Jovisic | last post by:
Hi! How to create an alert that responses in case of long querya. I haven't noticed any counters that deals with these kind of situations? Thx for your help!
9
by: Justin Koivisto | last post by:
Is there a way to create an alert-like message box that uses a custom image? Basically, I want to replace the default ! image with something else. -- Justin Koivisto - spam@koivi.com PHP...
8
by: Dan Williams | last post by:
We have an employee table that contains bank details and are experiencing problems with account numbers being erased and lost. In order to track down why this is happening (either due to our...
1
by: Stephanie | last post by:
I am trying to setup a Performance Condition Alert and on this one SQL 2000 Server the 'Type:' drop down does not give me the option to choose "SQL Server performance condition alert". "SQL Server...
4
by: Chad Myers | last post by:
I'm instrumenting my app with a few performance counters and I'd like to ask you all for some advice on how to handle performance counter instances. I have a class library that is a base library...
7
by: James | last post by:
Hi Has anybody had any experience of ASP.Net performance counters not updating. In the performance monitor application when I try to add the groups ASP.NET and ASP.NET Applications the...
4
by: Gregc. | last post by:
Hi Would someone have a basic example of form validation that validates name and address, but using only one alert box that displays which fields haven't been completed? I can do it on an...
1
by: sivaprasadch | last post by:
please can any one suggest me to how to display the alert message text in the different languages. iam implementing localization and globalization concept in my application ,when i change the...
11
by: AAaron123 | last post by:
In Page_Load I have the following wanting the popup to appear the first time (only) that the page is displayed. I get it each time. Can this be fixed? thanks Static beenHere As Boolean = False ...
23
by: Marge | last post by:
This may be in the wrong forum, but here goes. How can I display an alert in the users browser window from an asp page. For example, a welcome message. I know I can do this with response.write,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.