For more information about HTML and Web scripting, see one or more of the following references.Important JScript is Microsoft's implementation of ECMAScript, as defined by the specification of the European Computer Manufacturers Association.Copy the following code into a text document then save and name it form.html: The action for the form is the same as the last form tutorial (send.php) but we'll re-write it now to include the changes.The easiest way to check to see if a user has typed in a value in the text boxes is to use the empty() function.Using an if, else conditional: if (condition) else , we can make certain fields of our form required that they be filled out.Let's start by making a basic form with first name, last name, email and comments as our text inputs.If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site. Lisa Wollin Microsoft Corporation May 2004 Applies to: Microsoft® Office Front Page® 2003 Microsoft Front Page 2002 Microsoft Front Page 2000 Summary: Learn how validate HTML form fields using Java Script in Microsoft Office Front Page 2003.
I'll take it up a level and re-write that script using the if, else conditional and empty() function to include form validation.This article explains how to provide client-side validation for forms that you create either by hand or by using the form tools within Front Page.In addition, this article assumes a general understanding of HTML and Java Script, although a thorough understanding is not required.A user may have a browser that doesn't support client-side scripting or may have scripting disabled in the browser.Knowing the limits of client-side scripting helps you decide whether to use client-side form validation.This article assumes a general understanding of HTML and Java Script.(16 printed pages) Introduction Getting Started Writing the Validation Script Connecting the Form to the Script Associating Form Fields with Custom Script Code Listing Conclusion When you create forms, providing form validation is useful to ensure that your customers enter valid and complete data.Both Java Script and JScript are ECMAScript-compliant languages.When referring to Java Script in general, this article uses the generally accepted term "Java Script." However, when referring to documentation on the Microsoft Developer Network (MSDN) Web site, this article uses the term "JScript." Note The previous code specifies an e-mail address for the Action attribute of the form property.Because the code is stored on the server, server-side validation requires a roundtrip to the server.Sending data back and forth between the client and server can cause some delays.