peterhanse Posted August 28, 2016 Report Share Posted August 28, 2016 I have a Single Record Update data page, whit a autosubmit. Depending on the value I want the destination after record update to a specific page. Something like this. <script> var machtiging = "[@authfield:GEBRUIKERS_Machtiging]"; if(machtiging=="Yes") if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); window.location="[@app:logout]"; } else if(document.getElementById("caspioform")) { document.getElementById("caspioform").style.display = 'none'; setTimeout('document.forms["caspioform"].submit()',1000); } window.location="[@app:horseplanner_home]"; } </script> This is not good ,i now. but for the idea. does anyone have an idea Quote Link to comment Share on other sites More sharing options...
LWSChad Posted August 30, 2016 Report Share Posted August 30, 2016 Caspio handles destination upon submit. Add the code for the desired redirect to a "Dispaly a Custom Message" option on the "Destination" page in the form editor. Then you should be able to simplify your code <script> var machtiging = "[@authfield:GEBRUIKERS_Machtiging]"; if(machtiging=="Yes") { window.location="[@app:logout]"; } else { window.location="[@app:horseplanner_home]"; } </script> peterhanse 1 Quote Link to comment Share on other sites More sharing options...
peterhanse Posted August 31, 2016 Author Report Share Posted August 31, 2016 great, thank you EIQ. 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.