469,352 Members | 2,140 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

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 15751
"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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by dzeeq | last post: by
3 posts views Thread by Venkat | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.