Link to home
Start Free TrialLog in
Avatar of jdsiam
jdsiam

asked on

javascript confirmation box

Hi,
I have confirmation box in javascript code.By default buttons name are OK and Cancel.
I want to change buttons name as Yes or No.Is it possible inside javascript code??

 I have backup to create popup window of fixed size and display 2 buttons etc but looking for already available feature of javascript.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of nathana21
nathana21
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It will allow you as many buttons as you want, let you change them, and still be scriptable.
Avatar of mankowitz
This works in IE, but not firefox

<script language=javascript>

/*@cc_on @*/
/*@if (@_win32 && @_jscript_version>=5)

function window.confirm(str)
{
    execScript('n = msgbox("'+str+'","4132")', "vbscript");
    return(n == 6);
}

@end @*/
var r = confirm("Can you do it?");
alert(r);
</script>