I want to add a confirm dialog to a delete button to ask the user whether it is ok or not deleting the selected item.

If not, nothing should happend, else a url should be executed.

I know how to realize this via some Javascript code but I am looking for a solution that has less code. I mean e.g. :

<a href="mysite.de/xy/delete" onClick="...">Delete</a>

Is it possible to put the whole functionality in the onClick element without having some extra Javascript in the header?

Edit
Report