How to add Javascript Confirm Popup Alert
Yesterday I was writing a script to delete data from a database. The script was simple, show user the list of articles and and clicking on the delete button it deletes the article.
But then I thought it would be neat to add the same functionality that Wordpress has. It always confirms before deleting any post. Now the easiest way to do it is write some Javascript code.
<script type=”text/javascript”>
var reply = confirm (“Do you want to delete this article ?”)
if (reply)
//write the delete script here
<?php
delete from table where id=10;
else
//do nothing
</script>
Now what is does is it shows a confirm box. Reply will get a value YES if the user clicks on the ‘Yes’ option, otherwise it gets a NO value.
Peace.


Hello!
Hello!
Hello!
Very nice site! cheap viagra
Very nice site! [url=http://apxoiey.com/aoxxx/2.html]cheap cialis[/url]
Very nice site!
Hello!
viagra ,