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

Can you rename the buttons on confirm() call?

Javascript confirm call outputs a dialogue box that writes out a message and
gives two choices: OK and Cancel. Can those buttons be relabelled say to
"Yes" and "No"?
Jul 23 '05 #1
6 16079
"Chris Markle" <cm*****@sendmail.com> skrev i meddelandet
news:GVwud.639677$mD.83547@attbi_s02...
Javascript confirm call outputs a dialogue box that writes out a message and gives two choices: OK and Cancel. Can those buttons be relabelled say to
"Yes" and "No"?


No.

Joakim Braun
Jul 23 '05 #2
Ivo
"Chris Markle" wrote
Javascript confirm call outputs a dialogue box that writes out a message and gives two choices: OK and Cancel. Can those buttons be relabelled say to
"Yes" and "No"?


As stated in many many FAQ's , no. What you can do is rephrase your message
to make it answerable with OK and Cancel.
--
Ivo
Jul 23 '05 #3
Hi,

Chris Markle wrote:
Javascript confirm call outputs a dialogue box that writes out a message and
gives two choices: OK and Cancel. Can those buttons be relabelled say to
"Yes" and "No"?


You can't, but you can (and should) use a pop-up for this:

http://www.galasoft-lb.ch/myjavascri...000090401.html

The confirm, alert and input message boxes were never designed for user
interaction, only for debug purposes.

HTH,

Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

Jul 23 '05 #4
Ivo
"Laurent Bugnion" wrote
Chris Markle wrote:
Javascript confirm call outputs a dialogue box that writes out a message
and gives two choices: OK and Cancel. Can those buttons be relabelled
say to "Yes" and "No"? You can't, but you can (and should) use a pop-up for this:


Or a pop-in, a <div> or so with your own buttons which you show and hide at
will, at the same covering the page to temporarily disable interaction. This
solves all problems with pop-up blockers and no resources are wasted on a
whole new window.
The confirm, alert and input message boxes were never designed for
user interaction, only for debug purposes.


Their original purpose is as relevant as the next thing. Those message boxes
are extremely useful and useable and I am sure many end users, from geeks to
total newbies, appreciate their lightweightness, straightforwardness and
absolute clarity to the point where even the buttons *always* read the same
thing.
--
Ivo

Jul 23 '05 #5
Laurent Bugnion wrote:
The confirm, alert and input message boxes were never designed for user
interaction, only for debug purposes.


That's utter nonsense, especially when it comes to an *input* box
[created by the window.prompt() method call]. RTFM:

http://web.archive.org/web/200402141...w.html#1201497
http://web.archive.org/web/200402141...w.html#1201914
http://web.archive.org/web/200402141...w.html#1203158

It is instead but a matter of how the user interaction is performed.
Usually a *simple* "Yes/OK"-or-"No/Cancel" query is understood better
by the user than anything else.
PointedEars
--
Cosa significa "aidonandestend" ?
Jul 23 '05 #6
Thomas 'PointedEars' Lahn wrote:
Laurent Bugnion wrote:

The confirm, alert and input message boxes were never designed for user
interaction, only for debug purposes.

That's utter nonsense, especially when it comes to an *input* box
[created by the window.prompt() method call]. RTFM:


I am duly impressed with you Thomas. It only took you from 13 December
2004 until 29 January, 2005 to come up with that. And what he said is
not utter nonsense.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #7

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

Similar topics

2
by: dzeeq | last post by:
Hi, I wonder if it's possible to replace standard text on confirm-popup buttons from 'ok' and 'cancel' to some other captions. If not, is there a way to create quickly custom dialog, with only two...
3
by: Venkat | last post by:
Hi All, Currently i guess rename and remove are not supported using fstream. How do i rename or remove a file? regards, Venkat
7
by: Tom | last post by:
I'm having a problem using a path with spaces as a parameter to os.rename() in a program on WinXP. This works fine at the command line (where the folder "c:\aa bb" exists) > os.rename( "c\aa...
3
by: JenHu | last post by:
Hi experts, In my asp.net application, I use VB.NET code. I want to have a yes/no button in my popup message box when user click "Submit" button. It will check if the employee is a rehire, if...
7
by: TJS | last post by:
javascript "confirm" fires after deletion instead of before deletion. how do I get this to stop the processing ? code ================== Sub ShowAlert(ByVal s As string)...
2
by: ad | last post by:
We must do with Javascirpt when develop web UI. I write a alert function which can call from server side like: public static void alert(Page myPage, string sMsg) { string myScritpt; myScritpt...
2
by: AA Arens | last post by:
During my database construction, I left the names of the buttons, comboboxes named by default like Combo77, Command43. I can rename them with Properties Other Name, but them I start getting...
5
by: Russell Warren | last post by:
I've got a case where I'm seeing text files that are either all null characters, or are trailed with nulls due to interrupted file access resulting from an electrical power interruption on the...
3
by: smfaheem | last post by:
I have a problen regarding javascript that , i m generating html buttons in c# file for asp.net webpage and applying javascript on that html button but it is giving exception .The code is try ...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.