html - JavaScript Handling the onClick return value -


I have the following code to delete a document

   Tr & gt; To change the document, you will need to delete one already. & Lt; Form name = "delete_attachment_form" verb = "apr_attachment.cfc? Method = delete_apr_attachment" method = "post" & gt; & Lt; Input type = "hidden" name = "apr_attachment_id" value = "# apr_attachment_id #" & gt; & Lt; Input type = "hidden" name = "API_section_id" value = "#APR_section_id #" & gt; & Lt; Input type = "hidden" name = "submit_mode" value = "delete" & gt; & Lt; Input type = "submit" onClick = "confirm ('Are you certain that you want to delete the current project activity document')" value = "delete" & gt; & Lt; / Form & gt;  

But it is removing the document regardless of the user's fine / cancellation, I want the document to be deleted properly, how do I Should proceed?

This is a one-liner edit in your submit button:

  & Lt; Input type = "submit" onClick = "if (confirm ('do you really want to delete existing project activities document')) return false;" Value = "delete" & gt;  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -