Re: [WebDNA] Non-numbers entered into a field that asks for a
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 101602
interpreted = N
texte = This is a longer, less elegant way, but for archive sake here's an altern=ative:----------------------------------[text]goodChars=3D1234567890[/text][text]inputLength=3D[countchars][user_input_field][/countchars][/text][loop start=3D1&end=3D[inputLength]] [text]x=3D[getchars start=3D[index]&end=3D[index]][user_input_field][/=getchars][/text] [hideif [goodChars]^[x]] Bad Character ([redirect] back to form w/error or whatever) [/hideif][/loop]----------------------------------I just did this off the top of my head, so it's untested, but I've succes=sfully used similar code=20in the past.-Dan
Associated Messages, from the most recent to the oldest:
This is a longer, less elegant way, but for archive sake here's an altern=ative:----------------------------------
[text]goodChars=3D1234567890[/text]
[text]inputLength=3D
[countchars][user_input_field][/countchars][/text][loop start=3D1&end=3D[inputLength]]
[text]x=3D[getchars start=3D[index]&end=3D[index]][user_input_field][/=getchars][/text] [hideif [goodChars]^[x]] Bad Character (
[redirect] back to form w/error or whatever) [/hideif][/loop]----------------------------------I just did this off the top of my head, so it's untested, but I've succes=sfully used similar code=20in the past.-Dan
"Dan Strong"
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:
[protect admin] (1997)
[append] vs. [appendfile] delta + question? (1997)
oops private message leaked into talk list (1997)
Yet another db manager (2004)
using showpage and showcart commands (1996)
Nested Loops and SHOWIFs (1997)
If Then Else with dates (2000)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
[WebDNA] Milage tracker (2014)
Menu to select product variations (1997)
WebCat B13 Mac CGI -- Frames question (1997)
Different Email recipients? (1998)
SQL Connections (2004)
File Upload (1997)
convertWords... NEW (2001)
Verifying and adding new users (1997)
ShowNext Command (1997)
payflowpro problem #2 (2003)
Grant, please help me ... (1997)
Thanks and new Question on lineitems (2002)