word count in HTML form textarea and linebreaks
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34593
interpreted = N
texte = In the continuing saga of my current project (online submission of andpayment for classified ads for a newspaper), I'm having a problem getting acorrect [WordCount] of the contents of a textarea from an HTML form.I'm passing the value of a textarea to a template where I then take thatvariable and perform a [WordCount] on it. The textarea is a multilinetextarea, and people will be submitting info that they'll most likely breakup into multiple lines. That doesn't matter on our end, and I could forcethem to use a one line field (a form INPUT type=text sort of field), but I'drather give them that extra space to deal with.The problem is that [WordCount] doesn't see a break between these two words:wordonewordtwounless I put a space after wordone before I hit return. Now, nobody doesthat naturally.Can I somehow tell WebCatalog (in a prefs files or somewhere) to consider acarriage return as a word break?Or will I have to provide instructions to the user asking them to formatsomething a particular way (which I would GREATLY like to avoid)?Thanks!Steve------------------------------------------------Steven JarvisWeb Developersjarvis@nwaonline.netMorning News of Northwest Arkansashttp://www.nwaonline.net-------------------------------------------------------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
In the continuing saga of my current project (online submission of andpayment for classified ads for a newspaper), I'm having a problem getting acorrect [WordCount] of the contents of a textarea from an HTML form.I'm passing the value of a textarea to a template where I then take thatvariable and perform a [WordCount] on it. The textarea is a multilinetextarea, and people will be submitting info that they'll most likely breakup into multiple lines. That doesn't matter on our end, and I could forcethem to use a one line field (a form INPUT type=text sort of field), but I'drather give them that extra space to deal with.The problem is that [WordCount] doesn't see a break between these two words:wordonewordtwounless I put a space after wordone before I hit return. Now, nobody doesthat naturally.Can I somehow tell WebCatalog (in a prefs files or somewhere) to consider acarriage return as a word break?Or will I have to provide instructions to the user asking them to formatsomething a particular way (which I would GREATLY like to avoid)?Thanks!Steve------------------------------------------------Steven JarvisWeb Developersjarvis@nwaonline.netMorning News of Northwest Arkansashttp://www.nwaonline.net-------------------------------------------------------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Steven Jarvis
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:
[searh] or [shownext]problem (1998)
Question about replacing words (1998)
The beginning (1997)
Try not to laugh (2007)
Date Math (1999)
[WebDNA] returnraw redirects on version 6.2.1 on CentOS (2013)
authenticating a second user (1997)
WebCat website for developers and hosters (2001)
Sorting LISTFILES (1997)
WebDNA equivalent for $REQUEST_URI (2004)
syntax question, not in online refernce (1997)
Emailer Error 550 (Was Strange Crash) (1998)
WCS Newbie question (1997)
WebCat2 beta 11 - new prefs ... (1997)
[math] oddness .. (2002)
Tracking inbound links for discounts (1997)
greater than or equal to (1997)
where to put code (1998)
Problems reading files created by WC (1997)
New Command prefs ... (1997)