473,396 Members | 2,147 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,396 software developers and data experts.

window.confirm and return key

1
Is there a way to make window.confirm default to the Cancel button instead of the OK button? If so, what is it? If not, is there a way to disable the use of the return key?

Thanks for any help at all.
Suzy
Sep 14 '06 #1
1 2458
acoder
16,027 Expert Mod 8TB
No, there isn't unless you write a DHTML version which may not be completely modal.

What I suggest is that you rephrase the question to make OK the required default.
May 13 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Phil Powell | last post by:
<script> <!-- function willProceedToPay() { var willPay = window.confirm('Vill du g' . String.fromCharCode(229) . ' till betaling?'); if (willPay) return true; return false; }
1
by: Jane | last post by:
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 } ...
2
by: Dexter | last post by:
Hello all, I need to make a window confirm or a alert to confirm the exclusion of rows of a datagrid. somebody know how i make this? Thanks
1
by: Doo0592 | last post by:
Hi all, Judging by the topics in here this should be a snap for all of you! Can any one explain why when i use the window.confirm in an if else statement it behaves like this: if (var ==...
14
by: darrel | last post by:
Is it possible to pre-empt the javascript function used to do a postback from a linkbutton? I'd like to use linkbutton to delete a record and want to add a confirmation box via javascript "are...
3
smiley22
by: smiley22 | last post by:
How will I be able to change the prompt message of "window.confirm" The buttons are labelled as OK and CANCEL. How will I change the CANCEL to BACK??? Your response will be highly...
2
by: JJ297 | last post by:
I want a confirmation as such and after the user clicks the okay button go to the home page. Do I do something as such? Submit.Attributes.Add("onclick", "return window.confirm('Your entry was...
4
by: Arnab das | last post by:
Below is the javascript code i am using function confirmDelete() { var returnValue = window.confirm("Deleting the current page. Continue?"); return returnValue; // var...
5
by: GiJeet | last post by:
Hello, I'm trying to figure this code out. <input type="submit" onclick="if(!confirm('Are you sure?') return false; "... /> I know that if you return false in an event like this onclick it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
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,...

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.