473,811 Members | 2,979 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need to cancel a javascript alert/confirm box

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
Jul 23 '05 #1
7 11153
Anybody?

Thanks.
Jul 23 '05 #2
On 8 Nov 2004 07:42:13 -0800, Tasha's Dad wrote:
Anybody?


Rereading your description made my head spin, as it did the
firt time I read it, how about an URL* instead?
<http://www.spartanicus .utvinternet.ie/help_us_help_yo u.htm>
...advice echoed in my own document..
<http://www.physci.org/codes/sscce.jsp>

* An URL paints a thousand words.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #3
Sorry, I cannot post a URL. Hopefully, the description will provide
the details as it is intended.

Thanks in advance,
Barry

Andrew Thompson <Se********@www .invalid> wrote in message news:<ku******* *************** ******@40tude.n et>...
On 8 Nov 2004 07:42:13 -0800, Tasha's Dad wrote:
Anybody?


Rereading your description made my head spin, as it did the
firt time I read it, how about an URL* instead?
<http://www.spartanicus .utvinternet.ie/help_us_help_yo u.htm>
..advice echoed in my own document..
<http://www.physci.org/codes/sscce.jsp>

* An URL paints a thousand words.

Jul 23 '05 #4
On 8 Nov 2004 11:27:06 -0800, Tasha's Dad wrote:
Sorry, I cannot ..
* cannot?
..post a URL.


So you mean 'cannot', as in, ..
a) "someone will shoot me dead if I do"?
...or, perhaps more, ..
b) "I could not be bothered going to all that effort"?

( And please refrain from top-posting, that hardly encourages
the most helpful people on this group to respond to your problem. )

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 23 '05 #5
In article <7b************ **************@ posting.google. com>, barry-
ne**@sripd.com enlightened us with...
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.

--
--
~kaeli~
With her marriage, she got a new name and a dress.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #6
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.aler t.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
Jul 23 '05 #7
In article <7b************ **************@ posting.google. com>, barry-
ne**@sripd.com enlightened us with...
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.aler t.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

Jul 23 '05 #8

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

Similar topics

4
29925
by: PH | last post by:
Does anyone know how to have the pop-up javascript alert, Response.Write("<script language=javascript>alert('HEY!');</script>); , pop-up after the page has been posted back? I am pressing a button, validating data and then wanting to simply pop-up an alert if say the login is empty. When I click the button though the page is blank but the pop-up is there.
2
2888
by: Kenneth | last post by:
Hi, In a document I have three lines that detects and redirects to another page is a session variable is 0 If Session("Customer_ID")=0 Then Response.Redirect("myPage.aspx") End If What I really would like to have is a notification for the
2
7053
by: Kathy Burke | last post by:
I'm trying to use the following code to use a javascript return confirm. Cancel would exit the sub and return the page to its history (-2). OK would proceed with the asp.net code, i.e., run the Complete() sub. This is within a page that will take me quite a while to test, so I'd like to know if I've got this right beforehand. I think I'm missing something...but not sure what? Never used this before in this way. ...within a Sub...
1
4010
by: YANP | last post by:
Hi, I'm pretty sure after reading this board and many like it that it is impossible to change the ok, ok/cancel buttons that appear by default in the alert and confirm javascript dialogs. Now for question one why not? And question two why do they still say ok and ok/cancel when viewed in a non-english browser install? I have installed Chinese IE 6.0 and these buttons still say Ok/Cancel. the rest of the browser (buttons, menus,...
3
2655
by: Darrel | last post by:
I have a page that lists a bunch of items. You can check each item and hit ADD to add these items to a record in the DB. This page has a dropDownList. When you select an item from the list, I want to do an auto-postback and then list a new bunch of items that you can, again, check and click on ADD. If a person has items checked, and then changes the DDL BEFORE cliccking on ADD, I want to pop-up a confirmation 'do you want to add these...
22
2332
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. Using this line of code works great. It displays a little message box with the alert message in it. Me.btnGetArchivedTrips.Attributes.Add("onMouseOver", "alert('mouse over')")
2
1978
by: Seth Williams | last post by:
In the middle of my event handler (for a button), I have an if/then statement (using vb.net): if (whatever) then strScript="<script ....... strScript &= alert('This is an alert') strscript &="</script> ' this is all an abbreviated script - - but you get the idea response.write(strscript) end if response.redirect("another page.aspx")
25
5471
by: Oltmans | last post by:
Hi guys, I'm learning JavaScript and I need some puzzles that can make me a better JavaScript programmer. I mean I'm looking out for programming puzzles (e.g. Project Euler or TopCoder) but I'm looking out for language specific puzzles that can make me a top-notch JavaScript programmer. a) Any puzzles you can recommend? b) Any programs that you can suggest that can make me learn JavaScript internals in greatest depth. Please recommend...
2
2412
by: PrasathPalani | last post by:
Dear Experts, I have a Datagrid with delete options. I use to confirm from users and delete record from data grid. I give confrimation after each record has deleted when a DataGridCommandEventArgs event occured. protected void SetDeleteButton(Object sender, DataGridCommandEventArgs e) { try { if (e.CommandName == "Delete") {
0
9724
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10394
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9201
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5552
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.