Jump to content

Hidden Delete Button No Longer Working


Recommended Posts

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?

 

Link to comment
Share on other sites

  • 2 weeks later...
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

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...