View Single Post
  #28 (permalink)  
Old March 25th, 2010, 09:43 AM
elizas elizas is offline
Authorized User
 
Join Date: Jan 2010
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to elizas
Default How to create a customized confirmation alert in javascript

When you implement a delete feature in your application, a very basic additional feature which is always expected to be implemented is a confirmation box, so that the user gets a prompt before doing some delete activity.

For implementing this, there is already a Javascript function called confirm().
The syntax for this is very simple and i am sure every developer is aware of this. The syntax is as follow:

var confirm = confirm("Are you sure you want to do this?");
if(confirm)
{
//do your delete operation
}
else
{
return false;
}
Hope this answer helped u.
__________________
Cheers,
Eliza

Mindfire: India's Only Company to be both Apple Premier & Microsoft Gold certified.
Reply With Quote