|
Rank: Member Groups: Member
Joined: 2/21/2008 Posts: 25
|
Hi,
I have a dialog with hidden cancel button and cancel button is undefined. When enter is pressed, dialog turn to hidden and after postback he turn to visible again. How to prevent this behavior (I don't want any reaction on enter pressed)?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
|
|
Rank: Member Groups: Member
Joined: 2/21/2008 Posts: 25
|
Probably yes... Does it changes anything because I'm showing my dialog on postback (serverside) as you can se in row below: MyDialog.InitialState = EO.Web.DialogState.Visible
There is many dialogs and its quite lot of code to write in javascript to prevent hide on enter pressed. According this solution, I need to write javascript function on for every dialog I have in project and asociate with it. Is there any more elegant way? No any property changes or something?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
To the dialog control, The JavaScript code is a property change. The solution requires you to put the JavaScript function in your page (usually can be done through master page or common shared js files) and associate the function the dialog by setting the dialog's ClientSideOnAccept to the name of the function.
This has nothing to do with whatever other code you have on the server side.
Hope this helps.
|
|
Rank: Member Groups: Member
Joined: 2/21/2008 Posts: 25
|
Thanks.
|
|