Automatically Jquery close alert /dialog box
Automatically
Jquery close alert /dialog box
//Add below html code into body
<div id="dialog1" title="Alert Message" style="display:none">
<asp:Label ID="lblMessage"
runat="server"
Text="Record
Inserted Successfully"></asp:Label>
</div>
//add below code into head
<script type="text/javascript">
function DisplayPOP() {
var mydiv = $('#dialog1');
mydiv.css('display', 'block');
mydiv.dialog({ autoOpen: false, height:
20, width: 300 });
mydiv.dialog('open');
//send
the time
AutoCloseDialogBox(3000);
return false;
}
function AutoCloseDialogBox(WaitSeconds) {
setTimeout(function () { $("#dialog1").dialog("close"); }, WaitSeconds);
}
</script>
Comments
Post a Comment