|
|
JavaScript Demos:
|
Discussion.This example is EXACTLY THE SAME as previous example EXCEPT that instead of placing the JavaScript validation functions in the HEAD section of the HTML, it uses the "SRC" attribute on the "SCRIPT" tag to include an external ".js" file. In this case it is taken from the "/JS" public library that we maintain on the UNHINFO server. Anyone can use these library scripts, though we do not have additional online documentation for them. Similarly you can place ".js" files in the same directory where your HTML files reside, or you could create your own JavaScript library area within your Contributor Account. The UNHINFO server software supports the MIME-type "application/x-javascript" required for use of included ".js" files. This is taken from Heinle, Chapter 4. It does a basic validation of each element of a form. It checks to make sure each field is not blank and in the case of the e-mail address it also makes sure it contains an at-sign and a period. Things start to get more complicated in the scripting. Please note the following:
|
|