View Full Version : How to change default behavior of confirm() method

09-21-2005, 11:07 AM
Hi all,

While fixing a bug, my client ask me to change the defualt behaviour of the confirm() method of javascript.

If we use confirm() it gives two choices after the message OK and Cancel. By default the focus is on OK, do any one know how to change this default behaviour of confirm().
Help will be appreciated

09-21-2005, 11:18 AM
No, it's not possible.

09-21-2005, 03:39 PM
If this is for MSIE, you can use vbscript MsgBox (http://asp.programmershelp.co.uk/vbscriptmsgbox.php).
I think you can choose the default button with that one.

Otherwise, yup, you're SOL. Roll your own.