Confirm box in javascript: Are you sure you want to delete?

We’ve been there. To click by mistake a link or a button which deletes an information and not to be asked if I am sure I want to do it. And there goes my work… one second of not paying attention…

So, why not make in our pages, on those links that are important, an intermediary step (a confirm box) in which people get to be asked if they are sure on the actions they are about to make?

And all is made with a simple javascript code inside the “a href” tag:

You could, ofcourse, make it a bit more complex like this…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

No spam? * Time limit is exhausted. Please reload CAPTCHA.