By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.