View Full Version : YesNoCancel dialog box

12-24-2003, 08:31 AM
Hi Everyone!

Sorry, for asking this question, but, I just forget if it's possible or not. Is it possible from JavaScript to pop-up a YesNoCancel dialog box? And if it is then how?

BIG THANKS to Everyone!

12-24-2003, 08:44 AM
You can get an OK/Cancel dialog using the confirm method. For example:
confirm('Are you sure?');However, you just can't customize what the buttons say or how they are styled. If cross-browser compatibility isn't a problem for you, you could use VBScript's MsgBox (http://www.devguru.com/Technologies/vbscript/quickref/msgbox.html) function in order to choose how the dialog should be displayed. Your only other option would be to create some kind of "fake" dialog in JavaScript which would then allow you to customize how it looks and what the buttons would say.

12-24-2003, 09:14 AM
Thanks a lot buddy!

12-24-2003, 09:16 AM
You're quite welcome. ;)