How to make background inactive when a window is opened.

3 posts, 0 answers
  1. Manish
    Manish avatar
    5 posts
    Member since:
    Aug 2018

    Posted 30 Aug 2018 Link to this post

    Hi,

    I am opening a window on clicking a button but at the same time i want the background to be inactive/blur/hidden, such that user should not be able to click anywhere but the window.

    for ex: -(attached a picture in attachment)

     

    <script>
        function putOnHoldPopup(requestId) {
            debugger;
            $("#window").html(' <textarea id="txtArea" style="margin: 0px; height: 95px; width: 517px;resize:none;" watermark-text="Enter your comments here......"></textarea ><button>Save</button>');
            var myWindow = $("#window");
            myWindow.kendoWindow({
                width: "600px",
                height: "300px",
                title: "Provide a valid reason to put the request on hold",
                visible: false,
                actions: [
                    "Minimize",
                    "Close"
                ],
            }).data("kendoWindow").center().open();
            $("#example").css("overflow", "hidden");
        }
    </script>

     

    here i am trying to hide the background but it is not happening.Any other way to hide the background.Please help.

     

    Thanks

    Manish Tiwari

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    2104 posts

    Posted 03 Sep 2018 Link to this post

    Hello Manish,

    You can prevent the user from clicking the Window's background by making the widget modal. This can be done by setting its modal option to true:
    myWindow.kendoWindow({
      modal: true,
      width: "600px",
      height: "300px",
      title: "Provide a valid reason to put the request on hold",
      visible: false,
      actions: [
        "Minimize",
        "Close"
      ],
    }).data("kendoWindow").center().open();


    Regards,
    Ivan Danchev
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Manish
    Manish avatar
    5 posts
    Member since:
    Aug 2018

    Posted 03 Sep 2018 in reply to Ivan Danchev Link to this post

    Wow..It's works for me Thanks  a lot Ivan.

     

    Thanks

    Manish Tiwari

Back to Top