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 OKSet-Cookie: CustNum=[math]custnum[/math]; expires=Wednesday, 31-Dec-1999 23:12:40 GMT; path=/; domain=www.yourdomain.comSet-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:
>(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 OKSet-Cookie: CustNum=
[math]custnum[/math]; expires=Wednesday, 31-Dec-1999 23:12:40 GMT; path=/; domain=www.yourdomain.comSet-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:
OT: WebDNA and LINUX (2004)
Search in 2 or more catalogs (1997)
Graphical display of sales volume (2003)
ANother SHOWIF problem (1997)
[SearchString] usage (1997)
Generating Report Totals (1997)
First postarg not taking in $Commands (1997)
Showif for mulitple variations (1997)
Re:What file? (1997)
BUG in [showif] using ^ (contains) (1997)
Line items in table cells (1997)
Fwd: [ANNOUNCE] BIAP W*API Patch plug-in (1998)
suffix mapping for NT? (1997)
&max= (2003)
PIXO support (1997)
Email within tmpl ? (1997)
[searchstring] (1998)
Server2003 and IIS 6.0 issues (2005)
Storebuilder, Smith-Micro Tech Support (2000)
WebMerchant and PCAuthorize (1998)