jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes customize confirm box button text ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "customize confirm box button text ???" Watch "customize confirm box button text ???" New topic

customize confirm box button text ???

verduka fox
Ranch Hand

Joined: Jan 18, 2001
Posts: 178
How do I customize the text on the buttons in a javascript confirm box? I want the buttons to say "Yes" and "No", not "OK" and "Cancel". How do I do this? Is it possible?
Also, is there any way to change the graphic on the confirm box? I think the default graphic on confirm box is a question mark. Is there any way to make this a more critical graphic?
Thanks for your help!
Tony Alicea

Joined: Jan 30, 2000
Posts: 3226
My answer to the first question is "I doubt it".
As for the second question, the (http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html#edef-BUTTON") W3C says YES (almost).
But only if you generate your own dialog box (with the window.open() method...)

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Vinod Kumar
Ranch Hand

Joined: Jan 18, 2002
Posts: 75
Hi Verduka,
Have you tried changing the graphics (instead of ?) on the confirm box?
Is it possible to change the caption of alert or conifrmation box?
Thanks in Advace,
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can not do it without using layers or another window.
There are languages like VB that can do it, but that is a whole differetn story.
I agree. Here's the link: http://aspose.com/file-tools
subject: customize confirm box button text ???
jQuery in Action, 3rd edition