Javascript Confirm popup, I want to show Yes, No button instead of OK and Cancel.
I have used this vbscript code:
<script language="javascript">
function window.confirm(str) {
execScript('n = msgbox("' + str + '","4132")', "vbscript");
return (n == 6);
}
</script>
this only works in IE, In FF and Chrome, it doesn't work.
Is there any workround to achieve this in Javascript?
I also want to change the title of popup like in IE 'Windows Internet Explorer' is shown, I want to show here my own application name.
You can't do this cross-browser with the confirm() function or similar. I highly suggest you use something like the jQuery UI dialog feature to create an HTML dialog box instead.
You can also use http://projectshadowlight.org/jquery-easy-confirm-dialog/ . It's very simple and easy to use. Just include jquery common library and one more file only: