showFormInDialog

I have a web application that I am using showFormInDialog for a modal form.

The form that is shown has three buttons, Continue, Cancel and Exit.

I use a global variable that I set to 1 before the ShowFormInDialog.

The form shows, user clicks the Continue Button. I have a function on the button that sets the value of gvOK to 0;

When the application returns to the calling function, the value of gvOK is still set at 1.

Any suggestions on how to get the return value from showFormInDialog?

Thanks!

Servoy

Version: 4.1.3 - build 672

There is a difference in web-client - the code in the method that opens the modal form continues to run after the form in dialog is open (due to implementation constraints), as opposed to smart client where the code will continue to run only after the dialog is closed. This has been discussed a lot (I think on the forum as well so you should find other topics about this) - the bottom line is that in web-client you can do the following:

  • initial code:
function someFunction() {
    [... code before open dialog]
    application.showFormInDialog(...);
    [... code after you would expect dialog is closed]
}
function dialogActionThatClosesTheDialog() {
    [... change some global for example and close dialog]
}
  • new web-client compatible code:
function someFunction() {
    [... code before open dialog]
    application.showFormInDialog(...);
}
function someFunctionContinued() {
    [... code after you would expect dialog is closed]
}
function dialogActionThatClosesTheDialog() {
    [... change some global for example and close dialog]
    someFunctionContinued() ;
}

Hi,

Paul Bakker also discussed this issue in his Webinair on Javascript.

I think this webinair has been recorded.

Regards,

Hans

got it to work.

Thanks for the direction…