It's not a secret anymore!
The moose likes HTML, CSS and JavaScript and the fly likes Regarding Customising Window.confirm 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 "Regarding Customising Window.confirm" Watch "Regarding Customising Window.confirm" New topic

Regarding Customising Window.confirm

Karne Reddy
Ranch Hand

Joined: May 28, 2006
Posts: 35
Hi Friends,

Can any one can throw some light on customisation of window.confirm()

function. I want Yes and No instead of Ok and Cancel.



Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can not change the properties of it. You would have to code your own from layers if you want to do that.

Roy Ivar Moe

Joined: Jun 22, 2006
Posts: 21
Maybe you want to redefine window.confirm all together....?

I've written down an example of how you can redefine window.alert here:

My example has extensive use of libraries, so the example itself might not be that useful for you, but the concept of redefining is described and there's a link in the post to some simpler code.


[ August 17, 2006: Message edited by: Roy Ivar Moe ]
[ August 17, 2006: Message edited by: Roy Ivar Moe ]
I agree. Here's the link:
subject: Regarding Customising Window.confirm
jQuery in Action, 3rd edition