|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 27
|
eo:Dialog, how to know when the user press "ESC" key
I need to do something when the user pres "esc" key, how can I detect when the user press that key ?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, You can handle the dialog's ClientSideOnCancel event: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.Dialog.ClientSideOnCancel.htmlYou would supply the name of a client side JavaScript function to this property:
Code: HTML/ASPX
<eo:Dialog ClientSideOnCancel="dialog_canceled" ...>
....
</eo:Dialog>
Code: JavaScript
function dialog_canceled()
{
window.alert("dialog canceled!");
}
Thanks
|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 27
|
That is not working, how can I to disable that feature, I mean, when the user clicks on "esc" key the eo dialog do nothing ... ?
|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 27
|
<script type="text/javascript"> function dialog_canceled() { window.alert("dialog canceled!"); }
</script>
<eo:Dialog ID="powerStripModalDialog" runat="server" Height="200px" Width="200px" ClientSideOnCancel="dialog_canceled" ResizeImageUrl="00020014" BorderColor="#666666" BorderStyle="Solid" BorderWidth="1px" ControlSkinID="None" HeaderHtml="Dialog Title" MinimizeButtonUrl="" RestoreButtonUrl="00070103" BackColor="#666666" BackShadeColor="#666666" CssBlock="<style type="text/css"></style>" > <headerstyleactive CssClass="powerStripHeaderStyle" /> <footerstyleactive CssClass="powerStripFooterStyle" /> <contentstyleactive CssClass="powerStripContentStyle" /> </eo:Dialog>
What can i to do ? I need to disable the "esc" behavior,
|
|
Rank: Member Groups: Member
Joined: 2/24/2008 Posts: 27
|
AAAH Sorry.. yes it is working .... thanks ;)
|
|