When you use Javascript confirm() function, the dialog box will display Ok/Cancel buttons, which sometime it doesn't make sense for Yes/No question. This post will fix that problem by using VBscript (MsgBox).
function window.confirm(message) {
execScript('answer = MsgBox("' + message + '","4132", "Confirmation")', 'VBScript');
return answer;
}
function question() {
if (confirm('Is it Yes/No question?') == 6) {
alert('Answer is Yes');
}
else {
alert('Answer is No');
}
}
Wednesday, January 3, 2007
Subscribe to:
Posts (Atom)