Jump to content

my JS to stop page submitting isn't working today


Recommended Posts

Hi

I'm not sure what I've managed to do wrong today. This script worked yesterday and stopped my page from submiting. My user could select any of my filter buttons and the filter worked.

Today I've made a few changes - I switched to a new view (which included table change to a smaller table without lookups) and changing the html inside the doc to the new table.

But I can't understand how any of these changes would affect the script. Given I haven't provided any condition for a submit, I would have thought this script would stop submission entirely.

<script>
document.addEventListener('BeforeFormSubmit', function () {
event.preventDefault();
});

</script>

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...