Re: Question about replacing words

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 19636
interpreted = N
texte = If I had to guess, I'd try something like this:[Loop start=1&end=[CountWords][MyField][/CountWords]] [math show=f]displayed=0[/math] [ShowIf [ListWords start=[index]&end=[index]][MyField][/ListWords]=mytext] my other text [math show=f]displayed=1[/math] [/ShowIf] [HideIf [math]displayed[/math]=1] [ListWords start=[index]&end=[index]][MyField][/ListWords] [/HideIf] [/Loop]There are probably more efficient ways to do it, but this should work.-Dave At 3:30 PM 8/27/98, Kenneth Grome wrote: >Only one problem, I'm still not clear on how using the new [listwords] and >[countwords] contexts is going to help me perform a simple text string >replacement. Will you please post an example of the webdna code we can use >to perform this task in version 3.x? o--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--------------- 802.253.8612 --+ o--- dave@digitalfrontier.com --+ Associated Messages, from the most recent to the oldest:

    
  1. Re: Question about replacing words (Peter Ostry 1998)
  2. Re: Question about replacing words (Kenneth Grome 1998)
  3. Re: Question about replacing words (Grant Hulbert 1998)
  4. Re: Question about replacing words (Peter Ostry 1998)
  5. Re: Question about replacing words (Kenneth Grome 1998)
  6. Re: Question about replacing words (Peter Ostry 1998)
  7. Re: Question about replacing words (PCS Technical Support 1998)
  8. Re: Question about replacing words (Kenneth Grome 1998)
  9. Re: Question about replacing words (Grant Hulbert 1998)
  10. Re: Question about replacing words (Kenneth Grome 1998)
  11. Re: Question about replacing words (Kenneth Grome 1998)
  12. Re: Question about replacing words (Kenneth Grome 1998)
  13. Re: Question about replacing words (Grant Hulbert 1998)
  14. Re: Question about replacing words (Christer Olsson 1998)
  15. Re: Question about replacing words (Alex McCombie - New World Media 1998)
  16. Re: Question about replacing words (Alex McCombie - New World Media 1998)
  17. Re: Question about replacing words (Dave MacLeay 1998)
  18. Re: Question about replacing words (Christer Olsson 1998)
  19. Re: Question about replacing words (Kenneth Grome 1998)
  20. Re: Question about replacing words (Alex McCombie - New World Media 1998)
  21. Re: Question about replacing words (PCS Technical Support 1998)
  22. Re: Question about replacing words (PCS Technical Support 1998)
  23. Re: Question about replacing words (Alex McCombie - New World Media 1998)
  24. Question about replacing words (Alex McCombie - New World Media 1998)
If I had to guess, I'd try something like this:[Loop start=1&end=[countwords][MyField][/CountWords]] [math show=f]displayed=0[/math] [ShowIf [ListWords start=[index]&end=[index]][MyField][/ListWords]=mytext] my other text [math show=f]displayed=1[/math] [/ShowIf] [HideIf [math]displayed[/math]=1] [ListWords start=[index]&end=[index]][MyField][/ListWords] [/HideIf] [/Loop]There are probably more efficient ways to do it, but this should work.-Dave At 3:30 PM 8/27/98, Kenneth Grome wrote: >Only one problem, I'm still not clear on how using the new [listwords] and >[countwords] contexts is going to help me perform a simple text string >replacement. Will you please post an example of the webdna code we can use >to perform this task in version 3.x? o--------------- Dave MacLeay --+ o----------- Digital Frontier --+ o--------------- 802.253.8612 --+ o--- dave@digitalfrontier.com --+ Dave MacLeay

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:

Generating unique SKU from [cart] - Still Stumped... (1997) AppleScript question (1997) multiple product databases (1997) Nested tags count question (1997) NY State Zip Codes & Tax percent (2002) Please post more "exceptions to the rules" ... (2005) Force a search at the default.tmpl page? (1997) Banners (1997) [WebDNA] [table] and COMMA in a Field (2015) webdna/mysql aggregate function bug? (2007) autocommit problem (1998) Re:listfiles-looking for slick solution (1997) REPOST: Overwiting SKU in Cart (2002) Search Problems (2000) Web Catalog 2 demo (1997) Three new problems, maybe a fourth (1997) [shownext] and sort (1998) expired beta (1997) Links inside of Text Areas (2000) Adding up weights (1998)