72 comments. Current rating: (24 votes). Leave comments and/ or rate it.
The return value is true (OK) or false (CANCEL).
The word CANCEL is misleading. I want to have the buttons say Yes/ No instead.
How can I do it?
However, I found the following which works at least in 32 bit Windows with IE (which often accounts for 95% of your site's users).
This solution uses vbscript's confirm() function.
No, it does not work in FireFox. FireFox will display Confirm/ Cancel.
/*@cc_on @*//*@if (@_win32 && @_jscript_version>=5)
execScript('n = msgbox("'+str+'","4132")', "vbscript");
return(n == 6);
var r = confirm("Can you do it?");
Any confirmation in same page, will appear with Yes/No button... Great !!
[hidden] from Indonesia
if (Form1.document.getElementById('txtTemp').value == 'run')
if(window.confirm('Are you sure want to change this file extention? Please be aware that changing the extension will affect the file readability.'))
document.getElementById('txtTemp').value = 'change';
document.getElementById('txtTemp').value = 'cancel';
anyone can help me ?
firstname.lastname@example.org from United States
But this code shows the title bar of the confirm dialog box 'VBSCRIPT: Confirm'. If I need to remove the 'VBSCRIPT' what do I need to do.