Confirm window pop-up using DHTMLx Window

Hello, We are facing an issue in one of our projects. We are using DHTMLx window feature. Actually we are converting all the pop-ups that are present in our application to DHTMLx windows for good look and feel. We are also converting the modal windows (modal window is opened using window.showModalWindow) into DHTMLx windows - but the issue there is that we are not able to get the control back to the calling JS function which opened the DHTMLX modal window [setModal(true)]. So basically we are not able to achieve a synchronous behavious as that of a normal Modal window.

In a normal modal window, the execution of the calling JS function will go into wait state till the modal window is closed by the user - but we are not able to achieve this scenario using DHTMLx window.

Hello,

the execution of the calling JS function will go into wait state till the modal window is closed by the user

our modal window doesn’t provide such a functionality.

Thanks Alexander for the reply. But we have DHTMLx license and really want to have the confirm pop-up window feature. So could you please help us in resolving the issue.

Sorry, but the component doesn’t support this functionality. We have no ideas how to resolve this issue.

Alexander - do you have any idea/ way to resolve this issue?

the execution of the calling JS function will go into wait state till the modal window is closed by the user

I believe you can mimic this sort of functionality in a couple ways.

The calling JS function could set a variable (named something like “b_waiting_for_input”) to true. It then will create and open the modal window and proceed to loop doing nothing until “b_waiting_for_input” has been set back to false. Who sets it back to false? The new window, on close, or on an OK button, can call back to a parent object which will set the “b_waiting_for_input” back to false, such that the calling JS function can then proceed.

Or (better) re-factor your logic such that the calling JS function launches the modal window and then exits - not waiting or caring about what is returned. A seperate callback type function is then designed which implements “the rest of the behavior” which you otherwise would have run upon return of control.

I would think a combination of ajax, callbacks and logic refactoring would get you what you ultimately need.