Re: accountnum using [listwords]

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 36838
interpreted = N
texte = Thanks John... helpful as ever!-joshI remember it well, it was 6.28.01 14:20, and John Peacock(jpeacock@rowman.com) wrote:> Josh Lynn wrote: >> >> Hello all: >> >> I'm using [listwords] to get all of the spaces or hyphens out of the credit >> card number on the last page before processing. It works well, and the >> correct number shows when I put [accountnum] at the bottom of the page. >> >> however, when I go to process, it is telling me that the accountnum is >> missing. also, if I pull the actual cart file from the server, the >> accountnum isn't there. But it does show up on screen... how is this >> possible> >> >> code: >> [creditnumber] is passed from previous page. >> >> [setheader cart=[cart]]accountnum=[listwords >> words=[interpret][creditnumber][/interpret]&delimiters= >> -][word][/listwords][/setheader] >> >> no line breaks! >> >> thanks >> -josh >> > > I would do the [listwords] bits outside of the [setheader], since it > returns multiple values inside something that expects 1 value. Remember > that was it looks like on the page may be nothing like it really is. > > If you are running 4.x, grep is a much easier way to do this: > > [text]accountnum=[grep search=([0-9]*)[- ]([0-9]*)[- ]([0-9]*)[- ] > ([0-9]*)&replace \1\2\3][creditnumber][/grep][/text] > > [setheader cart=[cart]]accountnum=[accountnum][/setheader] > > One advantage with the above is that if the user type spaces instead of > dashes, it will still work. Also, if they typed no spaces, the '*' > will grab the whole thing and stick it in \1. > > John > > p.s. you should also not need the [interpret] at all; [creditnumber] > will be displayed correctly as long as it was passed correctly. > > -- > John Peacock > Director of Information Research and Technology > Rowman & Littlefield Publishing Group > 4720 Boston Way > Lanham, MD 20706 > 301-459-3366 x.5010 > fax 301-429-5747 > > ------------------------------------------------------------- > 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/ > ------------------------------------------------------------- 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:

    
  1. Re: accountnum using [listwords] (Josh Lynn 2001)
  2. Re: accountnum using [listwords] (Josh Lynn 2001)
  3. Re: accountnum using [listwords] (John Peacock 2001)
  4. Re: accountnum using [listwords] (Josh Lynn 2001)
  5. Re: accountnum using [listwords] (Josh Lynn 2001)
  6. accountnum using [listwords] (Josh Lynn 2001)
  7. Re: accountnum using [listwords] (John Peacock 2001)
  8. Re: accountnum using [listwords] (John Peacock 2001)
  9. Re: accountnum using [listwords] (Brian Stodola 2001)
  10. Re: accountnum using [listwords] (John Peacock 2001)
Thanks John... helpful as ever!-joshI remember it well, it was 6.28.01 14:20, and John Peacock(jpeacock@rowman.com) wrote:> Josh Lynn wrote: >> >> Hello all: >> >> I'm using [listwords] to get all of the spaces or hyphens out of the credit >> card number on the last page before processing. It works well, and the >> correct number shows when I put [accountnum] at the bottom of the page. >> >> however, when I go to process, it is telling me that the accountnum is >> missing. also, if I pull the actual cart file from the server, the >> accountnum isn't there. But it does show up on screen... how is this >> possible> >> >> code: >> [creditnumber] is passed from previous page. >> >> [setheader cart=[cart]]accountnum=[listwords >> words=[interpret][creditnumber][/interpret]&delimiters= >> -][word][/listwords][/setheader] >> >> no line breaks! >> >> thanks >> -josh >> > > I would do the [listwords] bits outside of the [setheader], since it > returns multiple values inside something that expects 1 value. Remember > that was it looks like on the page may be nothing like it really is. > > If you are running 4.x, grep is a much easier way to do this: > > [text]accountnum=[grep search=([0-9]*)[- ]([0-9]*)[- ]([0-9]*)[- ] > ([0-9]*)&replace \1\2\3][creditnumber][/grep][/text] > > [setheader cart=[cart]]accountnum=[accountnum][/setheader] > > One advantage with the above is that if the user type spaces instead of > dashes, it will still work. Also, if they typed no spaces, the '*' > will grab the whole thing and stick it in \1. > > John > > p.s. you should also not need the [interpret] at all; [creditnumber] > will be displayed correctly as long as it was passed correctly. > > -- > John Peacock > Director of Information Research and Technology > Rowman & Littlefield Publishing Group > 4720 Boston Way > Lanham, MD 20706 > 301-459-3366 x.5010 > fax 301-429-5747 > > ------------------------------------------------------------- > 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/ > ------------------------------------------------------------- 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/ Josh Lynn

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:

Forcing a NEWCART (1997) [WebDNA] No [interpret] on unix-Macintosh OSX FastCGI version 7.0.594 (2012) WC 2.0 frames feature (1997) Still having problems with Authen (1997) MySQL blob question, Netscape slow question (2002) Webcat Security (1998) AOL and webcat (1998) WebTen Type 2 Crash on start (2000) Wits end with this [sendmail] problem. ;) (2000) WebCatalog can't find database (1997) New servers and new inline cache (1997) RE: redirect with more than 256 characters (1999) It gets better... posting problems + Webcat 3.0.7 available -did anyone know? (2000) need e-commerce recommendation (2004) Alternating colors (1997) # fields limited? (1997) list archives (2004) Frames and [cart] (1998) [WebDNA] DNA suffix (2008) Textarea (1998)