function fancyConfirm(msg, callback) { var ret; jQuery.fancybox({ 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() { $("#fancyConfirm_cancel").click(function() { ret = false; jQuery.fancybox.close(); }) jQuery("#fancyConfirm_ok").click(function() { ret = true; jQuery.fancybox.close(); }) }, afterClose: function() { if (typeof callback == 'function') { callback.call(this, ret); } } // function() // { // callback.call(this, ret); // } }); } function fancyConfirm_text() { var src ; fancyConfirm("Are you sure you want to unfollow this project?", function(ret) { alert((ret)); // alert(src+'-'+ret); src= ret; });
<asp:LinkButton ID="LnkBtnUnfollow" runat="server" CommandArgument ='<%# Eval("item_id")%>' OnClick="delete" OnClientClick="return fancyConfirm_text(); " class="draft_link_tabs_but">Unfollow</asp:LinkButton>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)