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:

    Fun with Dates - finally resolved but.... (1997) DRC (2004) SSL and reg web* (1997) Silly Question (2003) Separate SSL Server (1997) Server IP address? (1998) New WebCatalog Version !!! (1997) WebCatalog can't find database (1997) WebCatalog Hosting (1996) [WebDNA] 8.0.2 Install on Yosemite Fails (2015) Re:Non-technical messages ... (1997) WebCatalog can't find database (1997) jpeg upload compression (2002) searching by date range help needed (1997) WebCatalog f2 Installation (1997) [WebDNA] Stop hacking (2013) Field names beginning with Reg.. (2002) WebCatalog for NT (1999) Email encryption (1998) Re[2]: setlineitem quantity to zero? (2000)