Need to cancel a javascript alert/confirm box

T

Tasha's Dad

A description of the problem:
1) Go to a page with various settings and a timeout (forces re-login
if over 10 minutes)
2) Before the timeout, make some changes to settings.
3) Press a "reset to defaults" button that uses a confirmation box to
let the user know what is about to be reset (lists items).
4) Walk away while the confirm box is displayed and come back after
the page timeout.
5) My screen now has the page, a confirm popup on top of that, and a
timeout alert on top of that.
6) Press OK to dismiss the timeout alert. The underlying page goes to
the login screen, but the confirm box remains.

How can I clear any javascript alert/confirm popups in this situation
automatically?

Thanks,
Barry
 
T

Tasha's Dad

Sorry, I cannot post a URL. Hopefully, the description will provide
the details as it is intended.

Thanks in advance,
Barry
 
K

kaeli

barry- said:
Sorry, I cannot post a URL. Hopefully, the description will provide
the details as it is intended.

Obviously it didn't or one of us would have answered it by now.
Make a sample and post it to geocities. There is no valid reason for not
having a URL. Only excuses.

You want people to help you, you have to help them help you.

--
 
T

Tasha's Dad

To simplify the question, if I open a javascript alert with

alert('Hi how are you, thanks for helping.');

I need a way to cancel the alert. How can I kill the alert? Is there
something like javascript.alert.cancel()?
Andrew wrote:

Hi Andrew.
So you mean 'cannot', as in, ..
a) "someone will shoot me dead if I do"?

Yes, exactly.
..or, perhaps more, ..
b) "I could not be bothered going to all that effort"?

Also a little true. This is part of an embedded application. It
requires scripts to execute properly. Geocities last I knew won't
allow you to run perl scripts or executables.

Thanks folks. If I have a chance to strip it down to the bare
minimum, I'll post a link. Hopefully, the simplified question will
help. Usually folks want all the details, so that's how I started.

Barry
 
K

kaeli

barry- said:
To simplify the question, if I open a javascript alert with

alert('Hi how are you, thanks for helping.');

I need a way to cancel the alert. How can I kill the alert? Is there
something like javascript.alert.cancel()?

Ah. I see.

Nope, there isn't.

You may want to reconsider using "real" alerts to notify your users if this
is a frequent problem. You can simulate an alert with a floating div and an
onclick handler.
In fact, you have to kill the whole web browser session if you do something
stupid like accidentally put an alert in a non-terminating loop. Not that
I've ever done that while debugging or anything. ;)

Out of curiosity, what's the problem with the user just clicking YES on the
confirm to dismiss it? After all, they walked away...

--
--
~kaeli~
"No matter what happens, somebody will find a way to take
it too seriously."
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top