RE: Force a number with JavaScript

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17277
interpreted = N
texte = > -----Original Message----- > From: bob [mailto:bob@cybermill.com] > Sent: Saturday, April 25, 1998 11:24 AM > To: Webcat > Subject: Force a number > > > I need to require a number input and stop people from doing this:Here's some JavaScript to check for that and a whole lot more...Aloha, Olin=== Validation I

A Smut Engine to Replace Unwanted Words in Form Submissions
Depending upon the audience for your Web Site, you may wish to screen form submissions (at least perfunctorily) for content before processing them. This routine does not alert the user, but simply replaces offending words. Type some dirty words here and click the submit button.



Perfunctory Test of Email Address Entry Validity
Type an invalid email address here and click the submit button. (Tests for prefix length, the @ sign and the suffix)



Screening Entry for Non-Numeric Characters
Type some non-numeric characters (try a space, too) mixed with some numerals here and click the submit button.



Failure to Fill in Required Data
Don't type anything below. Just click the submit button a couple of times to see the functioning of this form entry test.



Formatting the Input a Bit
Type a short sentence below, in all caps or all lower case. This routine formats it to initial caps, if that is desired in some entries (such as topic titles, headlines or descriptions) It also handles jokers who love their caps lock keys. Our code for Navigator 2.x is not as full as for the Navigator 3.x, which also has logic for quotes and other punctuation.



Stripping Out HTML Entries
If entries will be displayed later, it may be important to disable any direct HTML entries folks decide they want to enter. Type some HTML into the text below. Then click the submit button to see how it is altered.


Associated Messages, from the most recent to the oldest:

    
  1. RE: Force a number with JavaScript (Olin 1998)
> -----Original Message----- > From: bob [mailto:bob@cybermill.com] > Sent: Saturday, April 25, 1998 11:24 AM > To: Webcat > Subject: Force a number > > > I need to require a number input and stop people from doing this:Here's some JavaScript to check for that and a whole lot more...Aloha, Olin=== Validation I

A Smut Engine to Replace Unwanted Words in Form Submissions
Depending upon the audience for your Web Site, you may wish to screen form submissions (at least perfunctorily) for content before processing them. This routine does not alert the user, but simply replaces offending words. Type some dirty words here and click the submit button.



Perfunctory Test of Email Address Entry Validity
Type an invalid email address here and click the submit button. (Tests for prefix length, the @ sign and the suffix)



Screening Entry for Non-Numeric Characters
Type some non-numeric characters (try a space, too) mixed with some numerals here and click the submit button.



Failure to Fill in Required Data
Don't type anything below. Just click the submit button a couple of times to see the functioning of this form entry test.



Formatting the Input a Bit
Type a short sentence below, in all caps or all lower case. This routine formats it to initial caps, if that is desired in some entries (such as topic titles, headlines or descriptions) It also handles jokers who love their caps lock keys. Our code for Navigator 2.x is not as full as for the Navigator 3.x, which also has logic for quotes and other punctuation.



Stripping Out HTML Entries
If entries will be displayed later, it may be important to disable any direct HTML entries folks decide they want to enter. Type some HTML into the text below. Then click the submit button to see how it is altered.


Olin

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

b12 cannot limit records returned and more. (1997) RE: [sendmail]- bcc? (1998) Cookies (1999) shopping cart bug? or link? (1999) Need relative path explanation (1997) looping table rows (1999) WebCat and AppleShare 6.0 (1998) shoppingcart reload qty (1997) question about checkboxes (1999) A Global Variable (1997) no template caching (1997) Quit revisited (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) File Upload (1997) WebCatalog NT beta 18 problem (1997) Replacing entry (1998) [Announce]: Web server security and password protection (1997) international time (1997) Setting up WebCatalog with Retail Pro data (1996) Linux Beta4 problems with multirecord returns (2000)