I have a modal window that once submitted, should reload the parent window. This window can be called from many different pages. I've setup a button on the modal page and set the button to be defined by Dynamic Action and execute validations. My DA has the following definition:
Event: Click
Selection Type: Button
Button: Send
Event Scope: Static
There are two true actions:
1. Submit Page
2. Execute JavaScript
parent.location.reload();
When there are no validation errors on the modal page this all works just fine - the parent page is reloaded and the modal window is closed (by way of the refresh). However, if the modal page has validation errors during the submit the second true action continues to fire and the parent page is reloaded, which erases the modal and doesn't give the user the ability to correct the form errors.
So my question is how to stop the second action from firing when there are validation errors? I've thought about trying to set a page item to a certain value during the submit page process and checking that within the JavaScript section, but it seems like there should be a cleaner more direct way. Anyone tackled this type of thing before?
Tony