This is a migrated thread and some comments may be shown as answers.

How to make background inactive when a window is opened.

2 Answers 3526 Views
Window
This is a migrated thread and some comments may be shown as answers.
Manish
Top achievements
Rank 1
Manish asked on 30 Aug 2018, 10:35 AM

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 Answers, 1 is accepted

Sort by
1
Ivan Danchev
Telerik team
answered on 03 Sep 2018, 06:00 AM
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.
0
Manish
Top achievements
Rank 1
answered on 03 Sep 2018, 08:32 AM

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

 

Thanks

Manish Tiwari

Tags
Window
Asked by
Manish
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Manish
Top achievements
Rank 1
Share this question
or