Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Dialog in JQuery

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 347
    Comment on it

    While using modalpopup we need to use the dialog boxes either in the customized way or we can do it using the already made dialog boxes which just needs to be invoked.

    So for doing that we need to make use of the default dialog boxes that can also be customized.

     

     $("#dialog-confirm").dialog({
                autoOpen: false,
                resizable: false,
                height: 170,
                width: 350,
                show: { effect: 'drop', direction: "up" },
                modal: true,
                draggable: true,
                open: function (event, ui) {
                    $(".ui-dialog-titlebar-close").hide();
    
                },
                buttons: {
                    "OK": function () {
                        $(this).dialog("close");
                        window.location.href = url;
                    },
                    "Cancel": function () {
                        $(this).dialog("close");
                    }
                }
            });

     

    In this dialog box we have functionalities to add buttons and modify the size and the look and feel of the modal popup.

    $("#dialog-detail").dialog({
                title: 'View User',
                autoOpen: false,
                resizable: false,
                width: 400,
                show: { effect: 'drop', direction: "up" },
                modal: true,
                draggable: true,
                open: function (event, ui) {
                    $(".ui-dialog-titlebar-close").hide();
                    $(this).load(url);
                },
                buttons: {
                    "Close": function () {
                        $(this).dialog("close");
                    }
                }
            });
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: