Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
WebDialogWindow to respond to default keys?
posted

If after adding two asp:Button objects to the WebDialogWindow (an OK and Cancel button), is it possible to wire up the dialog to respond to the default keys (the return/enter key and the escape key)?  I'm guessing no but I thought I'd at least ask.

Thanks,

Jeff

Parents
No Data
Reply
  • 24497
    Suggested Answer
    posted

    Hi Jeff,

    You may process OnClientClick and do actions related to dialog. I guess that "click" handler will be hit on default keys as well.

    <script type="text/javascript">
    function hideDialog()
    {
     $find('<%=WebDialogWindow1.ClientID%>').hide();
    }
    </script>
        <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="200px" Width="300px" >
         <ContentPane>
        <Template>
         <asp:Button ID="Button1" runat="server" OnClientClick="hideDialog()" Text="Hide" />
        </Template>
         </ContentPane>
        </ig:WebDialogWindow>

Children