Can you rename the buttons on confirm() call?

C

Chris Markle

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"?
 
J

Joakim Braun

Chris Markle said:
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
 
I

Ivo

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.
 
I

Ivo

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.
 
T

Thomas 'PointedEars' Lahn

Laurent said:
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/20040214.../javascript/1.3/reference/window.html#1201497
http://web.archive.org/web/20040214.../javascript/1.3/reference/window.html#1201914
http://web.archive.org/web/20040214.../javascript/1.3/reference/window.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
 
R

Randy Webb

Thomas said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top