Re: Help needed!

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16510
interpreted = N
texte = >(4) Last question is that this customer would like to use cookies. Is >there anybody that has implemented cookies with WebCatalog 2.1 (Mac) and >would like to share some of his code with me or give some tips on how to >set it up. It's new for me and I would like to get this running like the >Amazon.com website where customers who return are known and don't have to >fill in any customerinformation. Through 1-click shopping they can order >easily. > We are using cookies with no problems, though haven't had time to implement the 1-click yet. (on the list!!).Some tips: 1. Cookie values aren't readable until the next HTML page (just like HTML variables), so if you need a value on the same page it is declared, use the variable used to declare it.2. Save the file as a DOS format type file (in BBEdit Save As).3. Cookies don't get saved to client's disk until the browser is quit, in RAM until then. 4. Cookies are very particular about the domain name matching the server's domain name. (a pain for bringing up on a demo server). 5. Turn your browser on to see all cookies to ease debugging.Here's some sample code to get you started [ListCookies name=Visits] [math show=F]visits=[value]+1[/math] [/ListCookies] [ListCookies name=CustNum] [math show=F]custnum=[value][/math] [/ListCookies] [hideif [math]visits[/math]>0] [math show=F]visits=1[/math] [math show=F]custnum=[however you want to number your customers][/math] [/hideif] [returnraw]HTTP/1.0 200 OK Set-Cookie: CustNum=[math]custnum[/math]; expires=Wednesday, 31-Dec-1999 23:12:40 GMT; path=/; domain=www.yourdomain.com Set-Cookie: Visits=[math]visits[/math]; expires=Wednesday, 31-Dec-1999 23:12:40 GMT; path=/; domain=www.yourdomain.com blah, blah, blah [/returnraw] Good luck and enjoy the low calorie cookies!Sandy Associated Messages, from the most recent to the oldest:

    
  1. Re: Help needed! (Jack Baty 1998)
  2. Re: Help needed! (Sjoerd Jan ter Welle 1998)
  3. Re: Help needed! (Sandra L. Pitner 1998)
  4. Re: Help needed! (SIMS recommendation) (Christer Olsson 1998)
  5. Re: Help needed! (SIMS recommendation) (Kenneth Grome 1998)
  6. Re: Help needed! (John Hill 1998)
  7. Help needed! (Sjoerd Jan ter Welle 1998)
>(4) Last question is that this customer would like to use cookies. Is >there anybody that has implemented cookies with WebCatalog 2.1 (Mac) and >would like to share some of his code with me or give some tips on how to >set it up. It's new for me and I would like to get this running like the >Amazon.com website where customers who return are known and don't have to >fill in any customerinformation. Through 1-click shopping they can order >easily. > We are using cookies with no problems, though haven't had time to implement the 1-click yet. (on the list!!).Some tips: 1. Cookie values aren't readable until the next HTML page (just like HTML variables), so if you need a value on the same page it is declared, use the variable used to declare it.2. Save the file as a DOS format type file (in BBEdit Save As).3. Cookies don't get saved to client's disk until the browser is quit, in RAM until then. 4. Cookies are very particular about the domain name matching the server's domain name. (a pain for bringing up on a demo server). 5. Turn your browser on to see all cookies to ease debugging.Here's some sample code to get you started [ListCookies name=Visits] [math show=F]visits=[value]+1[/math] [/ListCookies] [ListCookies name=CustNum] [math show=F]custnum=[value][/math] [/ListCookies] [hideif [math]visits[/math]>0] [math show=F]visits=1[/math] [math show=F]custnum=[however you want to number your customers][/math] [/hideif] [returnraw]HTTP/1.0 200 OK Set-Cookie: CustNum=[math]custnum[/math]; expires=Wednesday, 31-Dec-1999 23:12:40 GMT; path=/; domain=www.yourdomain.com Set-Cookie: Visits=[math]visits[/math]; expires=Wednesday, 31-Dec-1999 23:12:40 GMT; path=/; domain=www.yourdomain.com blah, blah, blah [/returnraw] Good luck and enjoy the low calorie cookies!Sandy Sandra L. Pitner

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:

Re:E-Mailer (WebCatb15acgiMac) (1997) Setting up the server (1997) Dummy Credit Card Number for debug? (1997) restarting service remotely on NT (1997) listwords and delimiters.. showing blank word? (2004) Location of Browser Info.txt file (1997) [date format] w/in sendmail (1997) [Webcat 2]Next (1997) [WebDNA] What am I doing wrong with authenticate (2012) 2nd WebCatalog2 Feature Request (1996) WebCat2 - Getting to the browser's username/password data (1997) bug in wn searching NT version? (1997) all records returned. (1997) looking for developers with solutions (2000) TRAINING videos - Prove IT. (1998) Group search doesn't work. (1997) Bugs still *not* fixed as promised ... (2000) [WebDNA] [OT] WebDNA Wiki - need grammar check / suggestions (2009) Fwd: 502 Bad Gateway (1998) Resume Catalog ? (1997)