Meant to post this aaaaages ago in case I forgot where I found it originally, but of course I didn’t and so today I’ve had to dig around and find it again :)
This snippet of code pops up a confirmation dialog when, for example, you click a button on a web based form, making it ideal for building interfaces where you want to provide a preventative measure against accidental requests being made.
Check it out:
And here’s the code:
Credit to CodeToad for the original posting.