Disable the screen

3 posts, 0 answers
  1. Donald
    Donald avatar
    1 posts
    Member since:
    Sep 2008

    Posted 08 Apr 2009 Link to this post

    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. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Apr 2009 Link to this post

    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.
  3. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 08 Apr 2009 Link to this post

    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.
Back to Top