Sponsored White Papers, Webcasts, and Downloads
TechRepublic Resources
- Find out how to look for a number
- By Emily A. Vander VeerNow we know whether the user typed in a character. But did he or she enter numbers or letters? Most of the time, it's not enough to know that the user simply entered a character. Instead, you'll want to know that the user entered the correct...
- Tags: Scripting languages, first digit, parseFloat, JavaScript, isANumber, numberOrdered
- Technical articles 2003-10-01
- Check for a pattern
- By Emily A. Vander VeerNow we get even fancier. You can use JavaScript to determine if a text value conforms to a predefined pattern such as an email address, a social security number, a date, or an account number. We'll create an example that determines if a value looks like...
- Tags: Telecom & Utilities, Social Security, phone, closeParen, isANumber, openParen, areaCode
- Technical articles 2003-10-01
Additional Resources
- Learn how to process form data
- By Emily A. Vander VeerOnce you've verified that the user has entered valid data, it's time to do something with it. In JavaScript, that's fairly easy.We'll calculate the total adoption fee with the following function:function calcTotal document.orderForm.totalPrice.value = (document.orderForm.numberOrdered.value* 15.99);}Simple, eh? The calcTotal function simply takes the number supplied by the user...
- Tags: Scripting languages, Emily A. Vander Veer, calcTotal, orderPlaced, JavaScript
- Technical articles 2003-10-01
- Learn how to validate a whole form
- By Emily A. Vander VeerUnlike field-level validation, form-level validation examines a group or all of the values on a form together, as a whole, for consistency. Form-level validation is typically performed just prior to submitting a completed HTML form to a CGI program. We do this to make sure the...
- Tags: Scripting languages, Emily A. Vander Veer, fixThis
- Technical articles 2003-10-01
- << Previous
- page 1 of 1
- Next >>