ECMM6010 Fall 2003: Assignment 2 (Due October 13 by email to tt@cs.dal.ca)

Programming with JavaScript: submission confirmation (5).

 In class we discussed an example of a form validation using JavaScript (see slides). In this assignment you should write and publish a web page using JavaScript to confirm a form submission. Your webpage should look like this when called

 

 When you enter a value in the form (for example 333) and hit the Submit button, then you should see this window

 

 If you hit Cancel, then the form is not submitted. Otherwise you should send the from to http://www.cs.dal.ca/~tt/ECMM6010/thanks.htm and receive the following message:

  

In order to write this web page you can use the JavaScript function confirm(msg), which can take a string msg and returns a true or a false depending on which button is pressed (please look up the details if necessary).

 In order to abort or continue the submission of the from you have to use the return value in the onSubmit attribute like

 onSubmit="return valcheck()"

Please submit the URL of your script page to tt@cs.dal.ca by October 13.