/    Sign up×
Community /Pin to ProfileBookmark

setTimeout with an alert box

For a few years we have used setTimeout to open a pop up window after 17 minutes alerting the user that their asp session would expire in 3 minutes. In the pop up, we had a countdown so they could see how much time was left. Unfortunately since this was a page initiated pop up, we’ve been seeing it’s effectiveness dwindle lately due to built in pop up blockers. The only other way I can think of to let the user know their session is about to expire without using javascript to redirect them to another page is to just use an alert prompt. But, once you set the text on an alert, you can’t update it through setTimeout, can you? Redirecting the user on our site won’t work because they could be in the middle of filling out a form or something and if they get taken away from the form, hitting back doesn’t always repopulate the form with what they had entered. Does anyone have any ideas on alternatives? Thanks.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Jul 24.2006 — Look at what I have done here, serverside code is easy, should have no trouble doing it with asp.

http://radio.javaranch.com/pascarello/2005/10/25/1130246930301.html

Eric
Copy linkTweet thisAlerts:
@cakewalkr7authorJul 24.2006 — Looks good. Thanks!
×

Success!

Help @cakewalkr7 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...