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

Disable the screen

2 Answers 206 Views
Window
This is a migrated thread and some comments may be shown as answers.
Donald
Top achievements
Rank 1
Donald asked on 08 Apr 2009, 10:07 AM

Hello,

 

I am wondering if it is possible to call an existing RAD Controls JavaScript function that disables the screen. Similar to the modal affect in RAD windows but without creating a window.

 

The reason I want to do this, is because our web application creates errors if a user clicks multiple buttons while a post back is occurring. I was hoping to disable the screen using the OnSubmit JavaScript event and then re-enable using the OnLoad JavaScript event.

 

Please let me know if it is possible.

 

Regards,

Bernie

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Apr 2009, 12:33 PM
Hello Bernard,

Please go through the code library submission regarding "gray outing" page when displaying loading panel. I hope this will give some insight on how to disable/gray out page when submiting.

Thanks,
Princy.
0
Fiko
Telerik team
answered on 08 Apr 2009, 02:36 PM
Hello Bernard,

You could use the Telerik.Web.UI.ModalExtender object as follow :

My Default.aspx page :

<form id="form1" runat="server"
<asp:ScriptManager ID="ScriptManager1" runat="server"
</asp:ScriptManager> 
<div id="modalDIV"
</div> 
<telerik:RadWindow ID="RadWindow1" runat="server"
</telerik:RadWindow> 
<asp:Button ID="Button1" runat="server" Text="Set overly" OnClientClick="setModalOverly(); return false;" /> 
</form> 

The setModalOverly() function :

<script type="text/javascript"
    function setModalOverly() 
    { 
        var m = new Telerik.Web.UI.ModalExtender(document.getElementById("modalDIV")); 
        m.show(); 
    } 
</script>

As you see, you need a div element and pass the object to the ModalExtender's constructor. Additionally at least one RadWindow or RadWindowManager should be declared on the page.

I hope this helps.

All the best,
Fiko
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Donald
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Fiko
Telerik team
Share this question
or