Click here to Skip to main content
12,955,118 members (62,738 online)
Rate this:
Please Sign up or sign in to vote.
I am using this Fancy box plugin to display a light box for confirm delete functionality.

function fancyConfirm(msg, callback)
         var ret;
             modal: true,
             //  content: "<div style=\"margin:1px;width:240px;\">" + msg + "<div style=\"text-align:right;margin-top:10px;\"><input id=\"fancyConfirm_cancel\" style=\"margin:3px;padding:0px;\" type=\"button\" value=\"Cancel\"><input id=\"fancyConfirm_ok\" style=\"margin:3px;padding:0px;\" type=\"button\" value=\"Unfollow\"></div></div>",
             content: "<div id=\"unfollower\"><div><table class=\"light_marg\"><thead><tr><td colspan=\"2\">Unfollow Project</td></tr></thead><tbody><tr><td colspan=\"2\">Are you sure you want to unfollow this project?</td></tr><tr><td></td><td><input id=\"fancyConfirm_ok\" class=\"btn btn-primary btn-large\" type=\"button\" value=\"Unfollow\"><input id=\"fancyConfirm_cancel\" style=\"margin:3px;padding:0px;\" type=\"button\" value=\"Cancel\" class=\"btn btn-primary btn-large\"> </td></tr></tbody></table></div></div>",
             afterShow: function()
                     ret = false;
                     ret = true;
             afterClose: function()
                 if (typeof callback == 'function')
           , ret);

             //              function()
             //              {
             //        , ret);
             //              }
     function fancyConfirm_text()
         var src ;
        fancyConfirm("Are you sure you want to unfollow this project?", function(ret)
            // alert(src+'-'+ret);
             src= ret;

This is my on button click code on

<asp:LinkButton ID="LnkBtnUnfollow" runat="server" CommandArgument ='<%# Eval("item_id")%>' OnClick="delete"   OnClientClick="return fancyConfirm_text(); " class="draft_link_tabs_but">Unfollow</asp:LinkButton>

So when i try to delete the particular row the page displays the light box for the confirmation i click yes/No but the page does not perform postback it is because i placed return false .
Posted 29-Jan-13 23:02pm

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,539
CHill60 3,490
Maciej Los 3,153
ppolymorphe 2,030
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100