asp checkbox javascript confirmation event

Posted On // 1 comment
Code for ASP Checkbox



JS Code

function confirmBox(e)
{
if(e.checked==true)
{
var answer = confirm('Are you sure you want to cancel?')
if (answer)
e.checked=true;
else
e.checked=false;
}

}

1 comment:

  1. Saw your post on ScottGu's blog regarding MVC 3.
    To be able to run MVC 3 on a website running Net 4, look at http://www.hanselman.com/blog/BINDeployingASPNETMVC3WithRazorToAWindowsServerWithoutMVCInstalled.aspx
    I had to put 6 dll into bin folder:
    •System.Web.Mvc
    •Microsoft.Web.Infrastructure
    •System.Web.Razor
    •System.Web.WebPages
    •System.Web.WebPages.Razor
    And the default Web.config for projects also expects:
    •System.Web.Helpers
    Hope this helps
    edwatki

    ReplyDelete