M
Mohammed Siraj
Guest
Yes, so whatever we are doing on window close in the sample code above, the same can be done as part of some other event handler. From the above snippet: We are removing the default submit handler & adding a custom handler. This custom handler, if validation succeeds, launches a dialog. This will happend only once. That is once the dialog is launched, for the following onsubmit events we will just return TRUE from handler. Also note that when we close the dialog, we are submitting the form programmatically. This will cause the custom handler to execute but as explained earlier, it will not re-launch the dialog but simply return TRUE.
Continue reading...
Continue reading...