RE: [countChars] from <textarea>

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 17553
interpreted = N
texte = Hi Dave,Seems like you are trying to count the chars before the user submits data. Webcat works before the HTML is sent to the browser. I also think that you are using the command=append way of adding the info to the database. JavaScript can limit the number of characters, but here is a webcat solution:How about passing your fields to another page and use the [append] context to add your truncated data, like this:=== [append db=your.db]filedName=[showif [countChars][Posting][/countChars]>100]Posting=[getChars start=1&end=100][Posting][/getChars][/showif][hideif [countChars][Posting][/countChars]>100]Posting=[Posting]/hideif][/append] ===Replace 100 with the amount you want to limit. With this method you can also perform all kinds of other checks like blank fields, valid email address, etc.Hope this helps.Aloha, Olin> -----Original Message----- > From: Dave Herriman [mailto:herriman@kcmetro.cc.mo.us] > Sent: Wednesday, May 06, 1998 12:24 PM > To: WebDNA-Talk > Subject: [countChars] from [/countChars] > are net getting me very far. > > When I use the check: > [showif [countChars]<100] > > [/showif] > the field info still gets added to the db. I'm not counting anything, I > guess(?) > > -- > > .Dave. > > > webmaster > metropolitan community colleges > kansas city, missouri, 64111 > http://www.kcmetro.cc.mo.us > mailto:herriman@kcmetro.cc.mo.us > > > Associated Messages, from the most recent to the oldest:

    
  1. RE: [countChars] from [/countChars] > are net getting me very far. > > When I use the check: > [showif [countchars]<100] > > [/showif] > the field info still gets added to the db. I'm not counting anything, I > guess(?) > > -- > > .Dave. > > > webmaster > metropolitan community colleges > kansas city, missouri, 64111 > http://www.kcmetro.cc.mo.us > mailto:herriman@kcmetro.cc.mo.us > > > 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:

    Not really WebCat (1997) Running _every_ page through WebCat ? (1997) WebCat2 - [format thousands] (1997) WebCat2: Found Items syntax, etc. (1997) [HIDEIF] inside [FOUNDITEM] (1997) Forcing price recalculation in shopping cart (1998) WC2.0 Memory Requirements (1997) More WebMerch<->MacAuthoriz (1997) [WebDNA] Parsing XML...again... (2010) Need relative path explanation (1997) Great product and great job ! (1997) [SHOWIF AND/OR] (1997) How Many SKU's is enough? (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) absolute paths for databases? (1997) Upgrading old WebCat Database Files (1997) RE: Fishing: anyone on this group willing to do support? (1998) emailer on Windows Beta 18 (1997) Web Logs (1998) Hyperboard/bulletin board available (1998)