FREE tutorial,solution,RSS Feeds on Operating Systems, Programming, Web Development, Applications, Databases, Networking, Hardware, Security, SEO Free Expertsforge Membership
Join us as Moderator
Submit Article to Expertsforge.com Submit Article My Expertsforge
 
RSS Feeds, Help Help RSS Feeds
bannertop
 

JavaScript Tutorial: Creating a Message Box with OK and Cancel Buttons using Javascript

jawahar
10/31/2007 11:09:29 AM, Views: 2223
The following tutorial and code shows how to get the input from the user through a Javascript message box which contains the "OK" and "Cancel" buttons. Based on the user selection further processing can be handled.

<HTML>
<HEAD>
<SCRIPT language="JavaScript">
function Msgbox_OkCancel()
{
var retval;
retval = confirm('Are you sure?');
   if(fRet==true)
   {
      alert("Insert your code here...");      
   }
}
</SCRIPT>
</HEAD>
<BODY>
<a href="javascript: Msgbox_OkCancel();">Click here</a>
</BODY>
</HTML>
Next Steps:
Add this Tutorial to:
Blink Blink del.icio.ous Del.icio.us Digg Digg
Fark Fark Furl Furl Google Google
Reddit Reddit Simpy Simpy Spurl Spurl
Technorati Technorati Windows Live Win Live Yahoo Yahoo
Rate Me!
Avg Visitor Rating: Average Visitor Rating is 4 out of 5
Number of Ratings : 5 Votes
Rate:
Send Private MessageSend Message
Signup / Login To View the Solution or Provide Comments
Post Comment/Solution
Comment:*
        (Link Rules) 
  Use : [bold] for <b>; [/bold] for </b>; [italic] for <i>; [/italic] for </i>; [code] & [/code] for code
 
Categories
Options
JavaScript RSS Feed
Most Popular Tutorial
Most Popular Solution
Top Rated
Top Rankers
Overall
1. jawahar (1400)
Yearly -2008
1. jawahar (200)
Expertsforge Sponsors
bnrtop