NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to create a customized confirmation alert in javascript

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
elizas



Joined: 23 Mar 2010
Posts: 2

PostPosted: Thu Mar 25, 2010 1:49 pm    Post subject: How to create a customized confirmation alert in javascript Reply with quote

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 tip did help u.Any suggestions are welcomed.

http://www.mindfiresolutions.com/How-to-create-a-customized-confirmation-alert-in-javascript-631.php
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo