Welcome Guest Search | Active Topics | Sign In | Register

Control press enter event on eo:Dialog Options
Julieta
Posted: Wednesday, July 16, 2008 6:09:14 AM
Rank: Newbie
Groups: Member

Joined: 9/25/2007
Posts: 8
Hi,
I have a problen with the new version of the eo:dialog (vs: 5.0.51.2)

With a latter version of essential objects, I could control the event for press enter on a dialog, last week I update essential objects on my project, and always I press enter on a dialog, it closes.

I need control the press enter event, to bind an asp:gridview inner an update pannel. It was working ok until I need update the version.

How can I cancel the event on press enter on the dialog an have it control?

Before the update I use this javascript function:

function esEnter(e)
{
var characterCode = KeyCodePress(e); //character code is contained in IE's keyCode property
if(characterCode == 13)//if generated character code is equal to ascii 13 (if enter key)
if(validate())
Helper.getElement("btnBuscar").click();
return false;
}

Thanks!
Julieta.
eo_support
Posted: Wednesday, July 16, 2008 8:31:04 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
Hi Julieta,

The new version automatically handles enter key as it did with escape key. When user clicks enter key, the dialog would call your ClientSideOnAccept handler first, you can perform additional task as well as return false from there to cancel it.

Here is more information on how to use our client side JavaScript interface:

http://www.essentialobjects.com/ViewDoc.aspx?t=clientapi_howto.html

Thanks
Julieta
Posted: Wednesday, July 16, 2008 9:54:03 AM
Rank: Newbie
Groups: Member

Joined: 9/25/2007
Posts: 8
Thanks! I solve my problem using the ClientSideOnAccept.

Julieta.


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.