Yes/No Confirmation : Dialog « Window Browser « JavaScript DHTML






Yes/No Confirmation

  

<html>
<head>
<title>Untitled Normal Page</title>
<SCRIPT LANGUAGE="JavaScript">
      function confirmAction() {
        return confirm("Do you really want this subscription?")
      }
   
</SCRIPT>
</head>
   
<body>
<h2><em>JavaScript Chronicles -- Free Subscription Form</em></h2>
<form action="mailto:subscribe@website.com" method="POST" name="SubscribeForm" onSubmit="return confirmAction()">
<ol>
<li>What other magazines do you currently subscribe to?
<pre><input type=checkbox name="C1-SKU01" value="SKU01">PC Week
<input type=checkbox name="C1-SKU04" value="SKU04">DBMS
<input type=checkbox name="C1-SKU07" value="SKU07">Wired
<input type=checkbox name="C1-SKU10" value="SKU10">Yahoo
<input type=checkbox name="C1-SKU02" value="SKU02">InfoWorld
</pre>
  
</li>
<li>Please enter the reason you would like to subscribe to<em>JavaScript:</em><br>
<br>
<textarea name="Comments" rows=6 cols=46></textarea></li>
</ol>
<p>
<input type=submit name="Submit" value="Submit">
</form>
</body>
</html>

           
         
    
  








Related examples in the same category

1.Displays and monitors the most used dialog boxes
2.Dialog in JavaScript
3.Open a dialog window
4. String Object's Length, Document.Location Properties, confirm and input dialog
5. Working with the Alert, Confirm, and Prompt Methods
6.Alert box (dialog) with line-breaks
7.Button click to display dialog
8.Pop-up Window - centred
9.Display a confirm box (dialog)
10.Display a prompt box (dialog)
11.Confirm Dialog Box
12.The Prompt Dialog Box: check the return result
13.Document for the Modeless Dialog Box
14.Use prompt for password checking
15.User input
16.Non string parameter for alert()
17.Dialog Box Demo
18.Alert Window
19.Main Page for show Modeless Dialog
20.Document for the Modal Dialog
21.Main Page for show Modal Dialog
22.Create a pop-up
23.Alert Dialog
24.What is the output of a confirm dialog
25.If OK button was clicked
26.Use if-else with confirm dialog
27.Prompt Input Dialog
28.Pass string parameter to alert dialog box
29.Pass integer value to alert dialog box
30.Assign returning value from prompt dialog box to your variable
31.A carriage return in alert dialog box
32.Escape string in alert dialog box
33.Tab key in the alert dialog box
34.New line character in alert box