Click here to Skip to main content
15,945,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Need javascript customized yes no confirm box(No vbscript function)
Posted

There is a bottleneck in the previous solution. It works only with IE browser. So, as the cross browser solution, JQuery code is recommended as follows:

XML
$("#yesno").easyconfirm({locale: { title: 'Select Yes or No', button: ['No','Yes']}});
$("#yesno").click(function() {
    alert("You clicked yes");
});

<a href="#" id="yesno">Test Confirm Box with yes and no</a>
 
Share this answer
 
 
Share this answer
 
Javascript sample code is:

JavaScript
<script language="javascript">
    function window.confirm(str) {
        execScript('n = msgbox("' + str + '","4132")', "vbscript");
        return (n == 6);
    }
</script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900