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
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>
I already have the onclick event handlers wired up. Clicking is not this issue. What I'm looking for is to have the dialog box respons to keyboard events - return/enter for OK and escape for cancel.
>I guess that "click" handler will be hit on default keys as well.
Unless I'm missing something here, the click handlers handle mouse events, not keyboard events.