html - JavaScript validation-- onClick -


I have the code of the following code, which deletes a document when the deleted image is clicked

  & lt; 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 = "image" name = "submit" src = "image / delete" alt = "DELETE" & gt; & Lt; / Form & gt; & Lt; / TR & gt;  

Now I want to modify it and change the image to a button and put some basic JS validation so ask a confirmation message before removing it.

I have this as my code so far

  & lt; 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 = "Button" onClick = "Confirm Return ('Are you certain that you want to delete the current project activity document')" name = "submit" Value = "Delete" & gt; & Lt; / Form & gt; & Lt; / TR & gt;  

But when I click on this button, there is no change / effect in the page, is anyone here telling me what is happening? id = "form" to and form & gt; Add

; , then

  & lt; Input type = "button" onClick = "If (Confirm ('Are you certain that you want to delete the current project activity document') == 1) {Document.getElementById ('form'). Submit ();} "Name =" submit "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 -