Delay onSubmit until doc refreshed on web

I have a strange request. My web based application has a form that refreshes when the field Status changes - holds all current values etc but doesn’t run the onSubmit as it is not being saved.

During testing one of the testers has discovered that if you change the status and then save & close the form it bypasses all validation in the onSubmit event.

Anyone come across this problem before?

Subject: Delay onSubmit until doc refreshed on web

Trust me, a (Domino) refresh will run the onsubmit code. You have to add code to avoid running onsubmit-driven validation in no-save circumstances. If validation appears not to be running, then there’s something wrong with the JavaScript.

Subject: RE: Delay onSubmit until doc refreshed on web

Sorry Stan, I should have clarified. The setup is that the code that returns the value from the status dialog sets a temp field called refreshStatus to 1. The onSubmit only runs validations if this field is set to 0. The onLoad event sets this field to 0.

The problem is that the tester is hitting Save & Close after the onSubmit event has run, but before the doc has refreshed (about 0.5-1 sec delay), and so the onLoad event has not run.

Actually laying out like this has given me an idea - I could try the resetting of the field value within the if statement on the onSubmit. I’ll test and report back.