Higher Information Systems - The Internet

Page 137

CLIENT-SIDE SCRIPTING

The Private Sub Button_onclick() sub-routine is executed when the SEND NOW button is selected, or ONCLICK. In lines 90–120, the length of the first name and surname is checked. If either the first name or surnames have not been completed, then the number of letters in the name will be ZERO. If either name has not been completed, an error message will be displayed, but if the first name and surname have been completed, the data is ready for transmission to cgi_bin.

Task 46 1. Edit ‘Sub Form.html’ to include the extra VBScript needed for form validation. 2. Save the web page as ‘Sub Form.html’. 3. Display the page in a browser. 4. Select SEND NOW without entering any data. 5. Select SEND NOW after entering your own details.

THE INTERNET UNIT (H, INFORMATION SYSTEMS)

© Learning and Teaching Scotland

137


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.