How to apply javascript on asp.net button click? -
i'm using bootstrap alert autocloseable msg. code follow
<div id="alertdiv" class="alert"> <a class="close" data-dismiss="alert">×</a><span>' + message + '</span></div>
asp.net button click code
<div> <asp:button id="btnlogin" runat="server" text="login" cssclass="btn btn-block org" style="margin-top: 0px" onclick="btnlogin_click" validationgroup="login" onclientclick="msg();" /> </div>
javascript code follow. javascript written correct ? please check out!
<script type="text/javascript"> $(document).ready(function () { function msg() { window.settimeout(function () { $(".alert").fadeto(1500, 0).slideup(500, function () { $(this).remove(); }); }, 5000); } }); </script>
i hope can of help. must confess want achieve not clear me.
<script type="text/javascript"> myclosure=function() { var canyousee = "here i'm "; return (function () { return { canyouseeit: function(){return confirm (canyousee)}}; }); } </script> <asp:button id="button1" runat="server" text="button" onclientclick="(myclosure())().canyouseeit()" />
Comments
Post a Comment