TaxGuy Posted September 21, 2019 Report Share Posted September 21, 2019 I am calling a large script using an Event Listener <script type="text/javascript"> document.addEventListener('FormSubmitted', function(event) { [@app:calctax] }); </script> The function above is in the footer of a Single Record update form. The Parameter, calctax, has a 374 line script to calculated federal taxes. It seems to get in the way of the Submit button. I can enter a value in data field and nothing happens when I press the Update button, If I refresh the page and push it a few more times it will eventually update. Is there any way to time the Event Listener? Have it wait to complete before it runs my script? Any body else had problems running large calculation heave scripts? It is too bad calculated fields are so slow - would save me a lot of coding but I had a 2 minute load time using calculated fields. Thanks Quote Link to comment Share on other sites More sharing options...
Vitalikssssss Posted September 23, 2019 Report Share Posted September 23, 2019 Hi @TaxGuy, I believe that the JS event you currently use causes the issue. Try to use Caspio built-in event handler BeforeFormSubmit explained in this article: https://howto.caspio.com/release-notes/caspio-bridge-13-0/13-0-impacted-areas/ Hope this helps. Regards, vitalikssssss Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.