I Want To "intercept" A Delete Button Press July 25, 2024 Post a Comment I would like to 'intercept' a delete button press - I believe this is possible with Javascript? I don't know the exact terminology. Here's my code: type="submit" name="del" value=' . stripslashes($cultrow["cult_id"]) . '>Del</button></td> CopySolution 2: Without any JavaScript framework, the simplest thing would be to add an onclick attributeonclick="return confirm('Are you sure?');"CopyNote that your PHP code should read<button type="submit" name="del" value="' . htmlspecialchars(stripslashes($cultrow["cult_id"])) . '">Del</button> CopyTo avoid cross-site scripting vulnerabilities you must always HTML-escape any data you output to the page. You are also missing the double quotes at the value attribute. Share Post a Comment for "I Want To "intercept" A Delete Button Press"
Post a Comment for "I Want To "intercept" A Delete Button Press"