| Rank: Newbie Groups: Member
 
 Joined: 3/6/2009
 Posts: 7
 
 | 
		    We have one problem with Messagebox here. When message box comes on screen and user press enter or escape the messagebox get closed without callback function call. I want to block the escape or enter button click or want to handle escape or enter button click for messagebox. Do you have any workaround for this
		 | 
	| Rank: Administration Groups: Administration
 
 Joined: 5/27/2007
 Posts: 24,425
 
 | 
		    Hi,
 Yes. You will need to handle the dialog's ClientSideOnAccept and ClientSideOnCancel event. Both properties take a JavaScript function name. You can return false from your handler to cancel the event.
 
 Thanks!
 | 
	| Rank: Newbie Groups: Member
 
 Joined: 3/6/2009
 Posts: 7
 
 | 
		    When i get the OK & Cancel message box and if user press enter button the OkCallBackFunction of the message box should get called (i.e. Ok button click). Right now message box is getting closed Please have a look on below code which i am using to show message box. what modification i need to do in this code for handling enter press event
 function ShowConfirm(Title, Message, OkCallBackFunction, CancelCallBackFuntion) {
 var callbackfunction;
 if (CancelCallBackFuntion == undefined)
 callbackfunction = "AlertCallBack"
 else
 callbackfunction = CancelCallBackFuntion;
 
 var msg = replaceAll(Message, '\\n', '<br>');
 msg = replaceAll(msg, '\n', '<br>');
 eo_MsgBox(
 "W_Alert", 	//ID of the MsgBox control
 Title, 	//Message box title
 msg, //Message text
 null, 		//Icon
 [
 {
 Text: "OK", 	//OK button
 ClientSideHandler: OkCallBackFunction	//Client side event handler
 },
 {
 Text: "Cancel", //Cancel button
 ClientSideHandler: callbackfunction	//Client side event handler
 }
 ]);
 
 }
 | 
	| Rank: Administration Groups: Administration
 
 Joined: 5/27/2007
 Posts: 24,425
 
 | 
		    Hi,
 I believe our original reply has already answered your question quite clearly.
 
 Thanks!
 |