<form action="" method="POST" onsubmit="return updateVarss();"> </form> function updateVarss(){ return confirm("Вы подтверждаете удаление?"); } $(document).ready(function() { updateVars(); }); 

It is impossible to transfer from js to the dialog box, i.e. Now the window is completely gone .....

  • @dimas, If you are given an exhaustive answer, mark it as correct (click on the check mark next to the selected answer). - Nicolas Chabanovsky

1 answer 1

I in one of the projects hung a click handler on the delete button, maybe it will suit you.
Example

HTML

 <form action="" method="POST"> <input type="text" /> <input type="submit" onclick="return confirm('Вы действительно хотите удалить?')" /> </form> 
  • Well, I can do it too, I need it through js, because there then it will still read the selected information and transmit to the diology window) - dimas
  • Well, you write all the logic you want to do, and for your source code to work, you need to do it like this: jsfiddle.net/88wx46gh/2 - MasterAlex
  • jsfiddle.net/88wx46gh/3 turned out, but when canceled, it still works and when I put your code, the previous one stops working ( - dimas