Code Project

Link Unit

Monday, May 11, 2009

JavaScript : Convert Ok/Cancel into Yes/No

Just came across a post, brilliant way to change the confirm box from ok n cancel to yes n no

 

Found the info on the link http://www.delphifaq.com/faq/javascript/f1172.shtml

 

Here is the code:

 

<script language=javascript>

 

/*@cc_on @*/

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

 

function window.confirm(str)

{

    execScript('n = msgbox("'+str+'","4132")', "vbscript");

    return(n == 6);

}

 

@end @*/

</script>

 

Hope visitors find it useful.

Post a Comment