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?')" />
RSS-feed for comments

3 replys to “Add a Javascript warning before delete”

  • Fawad
    2010-12-08 @ 9:10 e m

    Thanks man. It helped.

    Reply
  • Patrick
    2011-04-06 @ 9:09 f m

    Thanks!

    Reply
  • ubunu tips »
    2011-04-27 @ 12:35 e m

    i use this tutorial to make a cool confirmation,,,,,thanxxxx

    Reply

Leave a reply