application.closeFormDialog() does not work in web client

Hi All,

We needed to implement a “Please wait, Operation in Progress” message for a servoy solution. To cater to the requirement, we have created a form and displayed it when start of a function using application.showFormInDialog() and just before terminating the function, we closed the form using application.closeFormDialog(). This is works perfectly in smart client. But, for web client the pop-up window doesn’t get closed. Can someone please explain what the problem is with this approach and how this can be resolved?

Thank you.

nimeshe:
Hi All,

We needed to implement a “Please wait, Operation in Progress” message for a servoy solution. To cater to the requirement, we have created a form and displayed it when start of a function using application.showFormInDialog() and just before terminating the function, we closed the form using application.closeFormDialog(). This is works perfectly in smart client. But, for web client the pop-up window doesn’t get closed. Can someone please explain what the problem is with this approach and how this can be resolved?

Thank you.

In web the operations you do don’t produce an immediate user interface result as it is based on request/response protocol. So, only after the script will be executed we will build the response and send it to browser. This is why this approach doesn’t work in web client. What should work is: open the form in dialog, do the stuff in some event of form/fields of form in dialog then close the form in dialog (use modal dialog). I don’t have the exact implementation but maybe this helps.

Hi nimeshe,

what you want to achieve here could be done using closure in javascript. To learn more about it/understand how it can help you should have a look at an excellent webinar Paul Bakker did a few weeks ago (on June 11th precisely - it has been recorded and the slides are also available on the forum).

See this post http://forum.servoy.com/viewtopic.php?f=26&t=12457 and follow the presentation, there is one example for the web client that does precisely what you need (I think)

Hope this helps,