Welcome Guest Search | Active Topics | Sign In | Register

default control in dialog Options
stever
Posted: Thursday, October 8, 2009 7:14:24 AM
Rank: Member
Groups: Member

Joined: 3/9/2009
Posts: 25
Is there anyway of wiring up a default control for the enterkey when the user is in a dialog? e.g. if I pop up a modal search box I can get the users to tab around but if they hit enter I would like it to submit the search rather than close.

Thanks for yuor time

Steve
eo_support
Posted: Thursday, October 8, 2009 7:54:50 AM
Rank: Administration
Groups: Administration

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

You will need to handle the dialog's ClientSideOnAccept event. Inside that event handler you can then trigger a postback (you can use our ScriptEvent control to do that). It will be something like this:

Code: JavaScript
function on_dialog_accept()
{
    eo_GetObject("ScriptEvent1").trigger("command_name", "command_argument");
}


Code: HTML/ASPX
<eo:Dialog ClientSideOnAccept="on_dialog_accept" ...>
...
</eo:Dialog>


You will then handle the ScriptEvent's Command event. The event arguments contains the command name and command argument you passed from your client side code when "trigger" method is called.

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.