Welcome Guest Search | Active Topics | Sign In | Register

eo:Dialog, how to know when the user press "ESC" key Options
xtremexploit
Posted: Wednesday, February 27, 2008 4:02:43 PM
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 ?
eo_support
Posted: Wednesday, February 27, 2008 4:08:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,093
Hi,

You can handle the dialog's ClientSideOnCancel event:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.Dialog.ClientSideOnCancel.html

You 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
xtremexploit
Posted: Wednesday, February 27, 2008 4:21:25 PM
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 ... ?


eo_support wrote:
Hi,

You can handle the dialog's ClientSideOnCancel event:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.Dialog.ClientSideOnCancel.html

You 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
xtremexploit
Posted: Wednesday, February 27, 2008 4:23:19 PM
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="&lt;style type=&quot;text/css&quot;&gt;&lt;/style&gt;" >
<headerstyleactive CssClass="powerStripHeaderStyle" />
<footerstyleactive CssClass="powerStripFooterStyle" />
<contentstyleactive CssClass="powerStripContentStyle" />
</eo:Dialog>


What can i to do ? I need to disable the "esc" behavior,
xtremexploit
Posted: Wednesday, February 27, 2008 4:47:05 PM
Rank: Member
Groups: Member

Joined: 2/24/2008
Posts: 27
AAAH Sorry.. yes it is working .... thanks ;)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.