Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
onClose - which button was pressed?
Wiesel
Hi,
is there any FormAPI-specialist out there who can tell me, how I can find out, which of the buttons 'Finish' or 'Cancel' was pressed, when the onClose-Event is triggered?
Thanks,
Wiesel
Find more posts tagged with
Comments
hemantxansa
I hope, it can work for you:
handle_close()
The event handler would return true if the close will be continue or false to cancel the close.
Hemant Goel
Xansa India Limited, Noida
Wiesel
Thanks for your reply!
I know that I can use the return value to close / not to close the window.
But I have to do an IWDatacapture.callServer() just in the case, 'Finish' was clicked. The window is closed anyway (by returning true) so that's not the problem I have.
cliffhanger
You could keep a Global boolean flag that gets set in the onSave handler.
When "Finish" is clicked, onClose gets triggered after onSave . When "Cancel" is clicked, onSave does not get trigerred.
So, in the function for onClose event you can check whether the boolean flag is set, if it is, that means "Finish" was clicked, "Cancel" was hit otherwise.
-cliff