joscetre Posted August 2, 2017 Report Share Posted August 2, 2017 I need to run some script when a record is deleted from a Details Page by the user. So I have hidden the regular Delete button and substituted the code below: <button onclick="DeleteFunction()">Delete</button> <script> function DeleteFunction() { document.getElementById("Mod0DeleteRecord").click(); } </script> However, when the substituted button is clicked, the confirmation box opens only momentarily, then closes by itself without actually deleting the record! I believe this used to work properly, so something may have changed on the Caspio end. (Note that if I unhide the regular delete button and click on that, it works fine.) Does anyone have experience of this happening? Quote Link to comment Share on other sites More sharing options...
Mathilda Posted August 15, 2017 Report Share Posted August 15, 2017 On 8/2/2017 at 9:03 PM, joscetre said: I need to run some script when a record is deleted from a Details Page by the user. So I have hidden the regular Delete button and substituted the code below: <button onclick="DeleteFunction()">Delete</button> <script> function DeleteFunction() { document.getElementById("Mod0DeleteRecord").click(); } </script> However, when the substituted button is clicked, the confirmation box opens only momentarily, then closes by itself without actually deleting the record! I believe this used to work properly, so something may have changed on the Caspio end. (Note that if I unhide the regular delete button and click on that, it works fine.) Does anyone have experience of this happening? Try using HTML of delete button, provided here Hope that helps 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.