Re: Adding to Cart
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 58752
interpreted = N
texte = Jesse Proudman wrote:> Create multiple unique ids on a page. The rest of the system uses > [cart] tags as ID values so if I try to do a normal [search]+1[/search] > it gives me the same problem.If you don't mind the unique ids being related, just append a string to the end of the [cart] value. The problem is that, as you have discovered, the [cart] generates a string of digits too large to represent as a number except with scientific notation.NOTE: you should not just use [random] to create your unique portion of the id, since technically speaking [random] numbers could include a finite sequence of the same number. If you have a fixed number of unique ids which you need to create, you could try something like this:[text show=f]id1=[cart]-1[/text][text show=f]id2=[cart]-2[/text][text show=f]id3=[cart]-3[/text][text show=f]id4=[cart]-4[/text]...(you should use some sort of delimiter between the [cart] and the sequence, so there is some visual clue that something is going on).In fact, you could have a [math] value which you use as a sequence number and increment after every new id based on the [cart]. But the important thing to note is that the id must be a text variable, not a math variable.HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 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://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Jesse Proudman wrote:> Create multiple unique ids on a page. The rest of the system uses > [cart] tags as ID values so if I try to do a normal [search]+1[/search] > it gives me the same problem.If you don't mind the unique ids being related, just append a string to the end of the [cart] value. The problem is that, as you have discovered, the [cart] generates a string of digits too large to represent as a number except with scientific notation.NOTE: you should not just use [random] to create your unique portion of the id, since technically speaking [random] numbers could include a finite sequence of the same number. If you have a fixed number of unique ids which you need to create, you could try something like this:[text show=f]id1=[cart]-1[/text][text show=f]id2=[cart]-2[/text][text show=f]id3=[cart]-3[/text][text show=f]id4=[cart]-4[/text]...(you should use some sort of delimiter between the [cart] and the sequence, so there is some visual clue that something is going on).In fact, you could have a [math] value which you use as a sequence number and increment after every new id based on the [cart]. But the important thing to note is that the id must be a text variable, not a math variable.HTHJohn-- John PeacockDirector of Information Research and TechnologyRowman & Littlefield Publishing Group4720 Boston WayLanham, MD 20706301-459-3366 x.5010fax 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://webdna.smithmicro.com/
John Peacock
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:
Multiple Selections in Pull-Down Menu (2000)
[protect admin] (1997)
WC Host List (2000)
mime types (2003)
Banners (1997)
Discounting prices across a site (1997)
Getting Total Quantity (1997)
Nested vs conditional (1997)
Cookie Question (1999)
TCPConnect to query for Domain expiration (2000)
Quick ShowIf question (1997)
MacWEEK article help needed (1996)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
More questions about serial number dishing (1997)
WC2b12: Yes, Formulas.db is for real (1997)
How long does a cart last? (2002)
[WebDNA] Bug in 6.2? (2009)
Another bug to squash (WebCat2b13 Mac .acgi) (1997)
Windows 2.1b4 WebCatalog available (1997)
Sort Order on a page search (1997)