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.
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.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan