DaveS Posted March 22, 2023 Report Share Posted March 22, 2023 Hello, I'm trying to autosubmit and redirect, but everything I've tried fails to go to the next page. It either doesn't submit at all or repeatedly submits without redirecting. Background I've reviewed several threads on automatic submission. The most comprehensive seemed to be this one, but it is over 10 years old, and uses functionality no longer supported (window.onload). A few facts: Single Record Update page Embedded (we're using Webflow, though I expect that is not important) Upon submission I need to re-direct to another page (location specified in an app parameter) The code I'm currently using is from this 2014 post and is below. <script type="text/javascript"> document.addEventListener('DataPageReady', function (event) { const error = document.querySelector('div[data-cb-name="HeaderErrorMsg"]'); if(!error){ if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } } }); </script> In addition to playing with the Javascript, I've tried each version of the JS with 2 destination approaches: Navigate to a new page (with the page specified) Display a message, with the script below to do the redirection <script> setTimeout(function () { window.location.href = "[@app:xxxxx]"; }, 2000); Check your email inbox </script> Would be very appreciative of any suggestions! 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.