Johnn Posted January 16, 2020 Report Share Posted January 16, 2020 I have been wondering for hours why this snippet of code does not work at all. Please let me understand what was lacking or wrong in my code. Thanks <script> document.getElementById("caspioform").onsubmit=sbmt; function sbmt() { alert('Submitted'); } </script> Quote Link to comment Share on other sites More sharing options...
cheonsa Posted January 16, 2020 Report Share Posted January 16, 2020 Hi @Johnn, You can use FormSubmitted event handler. I saw it in the howto article: https://howto.caspio.com/datapages/ajax-loading/ <script type="text/javascript"> document.addEventListener('FormSubmitted', function(event) { alert('Submitted'); }); </script> Roderick and Johnn 2 Quote Link to comment Share on other sites More sharing options...
Johnn Posted January 17, 2020 Author Report Share Posted January 17, 2020 Thank you! Works perfectly! Quote Link to comment Share on other sites More sharing options...
Johnn Posted January 17, 2020 Author Report Share Posted January 17, 2020 Please help on this another issue. I don't know why but the code below doesn't seem to work. <script> document.getElementById("Submit").style.display = "none"; </script> 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.