Sunday, 27 July 2014

Model Dialog in JQuery

Open content in an interactive overlay.
The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.
<!DOCTYPE html>
<html xmlns="">
    <meta charset="utf-8">
    <title>jQuery UI Dialog - Default functionality</title>
    <script src=""></script>
    <script src=""></script>
    <link rel="stylesheet" href="">

        function Showdlg() {
            $("#dialog").html("Confirm Dialog Box");

            // Define the Dialog and its properties.
                resizable: false,
                modal: true,
                title: "Modal Dialog",
                height: 250,
                width: 400,
                buttons: {
                    "Yes": function () {
                    "No": function () {

        function callback(value) {
            if (value) {
            } else {


    <button onclick="Showdlg();">Click to show dialog</button>
    <div id="dialog"></div>


No comments:

Post a Comment