I could only find the function confirm()
that gives OK/Cancel buttons. Is there any way to give Yes/No buttons?
views:
2143answers:
4
+1
A:
No, but there are JavaScript libraries that can accomplish this for you. Just as an example, Ext JS can be used to create a message box dialog.
ejack
2008-08-21 03:32:42
A:
Like everyone else above says, you're stuck with OK/Cancel using confirm()
.
I would like to recommend this jQuery plugin though: jqModal. I've used it on 3 recent projects and it has worked great for each one. Specifically check out this example:
6). FUN! Overrides -- a. view (alert), b. view (confirm) It is now time to show a real-world use for jqModal -- overriding the standard alert() and confirm dialogs! Note; due to the single threaded nature of javascript, the confirm() function must be passed a callback -- it does NOT return true/false.
travis
2008-08-21 03:48:47