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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It will allow you as many buttons as you want, let you change them, and still be scriptable.
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>
<script language=javascript>
/*@cc_on @*/
/*@if (@_win32 && @_jscript_version>=5)
function window.confirm(str)
{
execScript('n = msgbox("'+str+'","4132")',
return(n == 6);
}
@end @*/
var r = confirm("Can you do it?");
alert(r);
</script>