Add a Javascript warning before delete

2010-01-16 @ 14:34

The problem

I need to add a Javascript warning. This warning can be added to prevent people from accidentally delete something.

  • I don’t want a mess between my header tags.
  • I don’t even want to add Javascript to an external file.

The solution

You can add inline Javascript code. It’s quick and short:

<input type="submit" onclick="return confirm('Are you sure?')" />
Share
RSS-feed for comments

4 replys to “Add a Javascript warning before delete”

Leave a reply