473,387 Members | 1,464 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,387 software developers and data experts.

How to set default button to "Cancel" when using window.confirm?

How to set the default button to "Cancel" instead of "OK" when pop-up
the message box using the codes below:

if (window.confirm("Are you sure you want to delete?")) {
//Proceed to delete
}

Please advise, many thanks!!!!

Jane.
Jul 20 '05 #1
1 10435
In article <b4**************************@posting.google.com >,
yu***@ha.org.hk enlightened us with...
How to set the default button to "Cancel" instead of "OK" when pop-up
the message box using the codes below:

if (window.confirm("Are you sure you want to delete?")) {
//Proceed to delete
}

Please advise, many thanks!!!!

Jane.


I don't think you can.
The best way (IMO) to prevent user mistakes is a confirmation page.

--
--
~kaeli~
The secret of the universe is @*&^^^ NO CARRIER
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 20 '05 #2

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

Similar topics

3
by: Jeremy Redmond | last post by:
I want to prompt the user to confirm a delete, however, I am paranoid that they may accidentally hit enter key and delete. (you know how data enters will just cruise through messages) ...
0
by: Privacy Trap | last post by:
Hi I have a slight problem in trying to set up 2 forms linked to tables. What I want to do is to inform a control on one form(Apps) as to the value of a key of a 'new' record entered via a...
4
by: Graham Charles | last post by:
Hello, I'm finding that if I set the "Cancel" property during the AppStartup event, the application's Splash form remains loaded. A call to the Close property of the SplashForm at that point...
1
by: Appu | last post by:
How to Check in the window print dialog box whether we clicked either "print" or "cancel". while clicking a button i call wnidow.print() to pop up the windows PRint Dialog box. I want to check...
2
by: bay_dar | last post by:
Hi, I have an internal ASP.NET application that I'm are using to send e-mails out based on a single milepost or milepost range entered. I'm trying to do two things when a user clicks on the...
2
by: polocar | last post by:
Hi, suppose that you have a C# form with two buttons, that are the classical "btnOk" and "btnCancel" (besides them, of course in the form there can be many other controls). When the user clicks...
1
by: shaizaban | last post by:
hello, my question is as follows (very urgent): i generated in an aspx page a modalpopup ajax control. i inserted a user control into the panel contained in the popup control. the panel contains...
11
by: kimiraikkonen | last post by:
Hi, Vb.net 2005 express i've been working, the problem is: I use openfiledialog to browse files, i created some code to execute file with OK button, no problem. But if i press "cancel" button as...
2
Claus Mygind
by: Claus Mygind | last post by:
Is there a newer version of javaScript that will allow other text on the confirm dialogue box in place of "Ok" and "Cancel" Specifically for FireFox. I know that I can use visual basic for internet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.