Syntax for the Alert Box sample application shown above:

<center><h3>JS Software's Feedback Form</h3></center> <form action="" method="POST" onSubmit="alert('Thank you for your feedback.'); return true"> <input type="hidden" name="subject" value="JS Feedback Form"> Your name (optional): <INPUT type=text name="Customer Name" size=30 maxlength=75 value=""> <br> Your email (optional): <INPUT type=text name="Customer Email" size=30 maxlength=75 value=""> <br> Please tell us what you liked and didn't like about our site!<BR> <textarea name="Customer Comments" cols=50 rows=10 wrap=physical> </textarea> <input type="submit"> <input type="reset"> </form>

Syntax for the Test button shown above:

<form action="" method="POST" onSubmit="alert('The return value of the confirm method is: ' + confirm('Please click OK or Cancel.')); return true"> Click here to see the return value of the confirm method: <input type="submit" value = "Test"> <br> </form>

Syntax for the second version of the form above:

<center><h3>JS Software's Feedback Form (Version 2)</h3></center> <form action="" method="POST" onSubmit="if (confirm('Are you sure you want to submit this data?')) {alert('Thank you for your feedback.'); return true} else {return false}"> <input type="hidden" name="subject" value="JS Feedback Form"> Your name (optional): <INPUT type=text name="Customer Name" size=30 maxlength=75 value=""> <br> Your email (optional): <INPUT type=text name="Customer Email" size=30 maxlength=75 value=""> <br> Please tell us what you liked and didn't like about our site!<BR> <textarea name="Customer Comments" cols=50 rows=10 wrap=physical> </textarea> <input type="submit"> <input type="reset"> </form>