Page 1 of 1

Webview: Return of the close button

Posted: January 28th, 2022, 4:20 pm
by htuser
Dear CSPro Developer Team,
I would like to know what's the return when we close the webview?
Where can we have this return, in CSEntry or in the HTML UI?
Thanks in advance for your response

Re: Webview: Return of the close button

Posted: January 31st, 2022, 9:14 am
by Gregory Martin
In what context are you using the web control? From the htmldialog function, a blank string ("") will be returned if they close using, say, Alt+F4 or the back button on Android.

Re: Webview: Return of the close button

Posted: January 31st, 2022, 9:59 am
by htuser
Hi Greg,
Once again thanks a lot for the introducing HTML in CSPro. Rather than HTML dialog or View HTML, For UI form, i'm adding HTML as a report. It's because i can also write CSPro logic directly in it.
Until now, i don't know if it's possible to write CSPro logic in HTML dialog or any other HTML pages that can be opened by view.
When using report.view for UI, i would like that, when this HTML UI is closed, i can call some CSPro logic codes, for example, for writecase values collected by the HTML UI form.
htmldialog function, a blank string ("") will be returned if they close using
Yes, Alex helped me early and i understand this, but for report.view, i don't know the value...

A last question, does the report.save will save a HTML only page without any logic?

Please let me know,

Re: Webview: Return of the close button

Posted: February 3rd, 2022, 9:47 am
by Gregory Martin
When you write report.save(...), the logic in the report is evaluated at that time and then the resulting HTML file is saved to the disk. So these should result in the same output:
MY_REPORT.view();

MY_REPORT.save("my-report.html");
view("my-report.html");