Create a JavaScript Confirmation Box
Javascript confirmation boxes aren't used nearly as often as they used to be, mostly due to more advanced usages of JavaScript and modal boxes, but they are still helpful. Whenever I create administrative functionality for my customers, I always use a JavaScript confirmation box before executing any permanent action -- an example would be when a customer tries to delete a file.
The Code / Example
Delete File
The confirm
method returns the true/false result of the confirm box.
CSS and JavaScript: the lines seemingly get blurred by each browser release. They have always done a very different job but in the end they are both front-end technologies so they need do need to work closely. We have our .js files and our .css, but...
Mozilla Aurora 11 was recently released with a bevy of new features. One of those great new features is their initial implementation of the Battery Status API. This simple API provides you information about the battery's current charge level, its...
Client-side APIs on mobile and desktop devices are quickly providing the same APIs. Of course our mobile devices got access to some of these APIs first, but those APIs are slowly making their way to the desktop. One of those APIs is the getUserMedia API...
it is really cool!
doesn’t work on FF. If you hit cancel still goes to the link
You rock! This is great, was just looking for a way to pass PHP variable to javascript but with this tutorial I don’t have to complicate things, the whole process becomes less cumbersome… Really great stuff man!!!
this helped me have an idea… thanks guys!!!..
var c=confirm(“Are u sure?”);
if(c== false)
{return false;}
else
return true;