473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 16090
"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
47638
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
5747
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
9389
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
8023
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
2007
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
1264
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
5813
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
1538
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
1264
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
7231
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
7132
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...
1
7063
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
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5059
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3196
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.