Show jQuery popup dialog

jquery dialog
In web applications we need to show popup dialog to show errors or dialog to show message or to show confirmation dailog with ok and cancel button. jQuery UI library provides easy way to show dialog as model or simple dailog. For that we need to add ui js libraries in application.

<html xmlns="">
<head runat="server">
    <script src="development-bundle/jquery-1.7.1.js" type="text/javascript"></script>
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
    <script src="development-bundle/ui/jquery.ui.widget.js" type="text/javascript"></script>
    <script src="development-bundle/ui/jquery.ui.dialog.js" type="text/javascript"></script>
    <link href="Styles/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" />
    <title>jQuery Popup</title>
    <script type="text/javascript">
        $(function () {
            // Dialog  
                autoOpen: false,
                width: 600,
                buttons: {
                    "Ok": function () {
                    "Cancel": function () {
            // Dialog Link
            $('#btnDelete').click(function () {
                return false;
    <form id="form1" runat="server">
    <div id="dialog" title="Dialog Title">
            Do you want to delete record?</p>
    <input type="button" id="btnDelete" value="Delete" />


Post a Comment