ShowNext - HELP!

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32839
interpreted = N
texte = >I'm trying to use some code that was posted a while back to create >numbered links at the bottom of a page. >Example: 1 | 2 | 3 | 4 | 5 > >The numbers/links are generated like this: > >[search db=../admin/rt_journal_images.db&[formvariables >name=_&exact=F][getchars >start=2][name][/getchars]=[url][value][/url]&[/formvariables]startat=[ >startat]][founditems]

>value=[startat]>[description]
[/founditems] [showif [numfound]>1] > >[math show=f]ShowNextCount=1[/math] >[shownext method=post] >[showif [startat]=[math][start]-1[/math]] >[hideif [start]!1] >[ShowNextCount] | >[math show=f]ShowNextCount=[ShowNextCount]+1[/math] >[/hideif] >[/showif] >href=journal_photos.tpl?max=1&startat=[start]&db=../admin/rt_journal_ >images.db&[formvariables][name]=[value]&[/formvariables]> >[ShowNextCount] | [math >show=f]ShowNextCount=[ShowNextCount]+1[/math] >[showif [startat]=[math][start]+1[/math]] >[ShowNextCount] | >[math show=f]ShowNextCount=[ShowNextCount]+1[/math] >[/showif] >[/shownext] >[/showif] >[/search] > > >The journal_photos.tpl page is accessed from the main page via this href: >href=journal_photos.tpl?startat=1&_eqarticle_skudata=[article]&_max=1 >>View Photos > > >Here's the problem: when the journal_photos.tpl page is displayed the >first time the numbers linking to other photos display a link that >contains a [startat] that is 1 greater than the actual number. >Example: href=journal_photos.tpl?max=1&StartAt=2&db=../admin/rt_journal_images >.db&StartAt=1&_eqarticle_skudata=18&_max=1>1 > >You can see that the number being displayed is 1 but the StartAt >value is 2. If you click on the 1, image #2 is displayed and all the >numbers below display the _correct_ corresponding startat value. With >this being the case, a number is missing. Although 7 photos may be >associated with this story, only 6 numbers are displayed below (all >with an href offset of 1). > >Why is the first page getting a false startat value? > >If this isn't making sense to anyone, I can post a URL to review. _______________________Clint Davis Gray Loon Marketing Group 812.422.9999cdavis@grayloon.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. ShowNext - HELP! (Clint Davis 2000)
  2. ShowNext - HELP! (Clint Davis 2000)
>I'm trying to use some code that was posted a while back to create >numbered links at the bottom of a page. >Example: 1 | 2 | 3 | 4 | 5 > >The numbers/links are generated like this: > >[search db=../admin/rt_journal_images.db&[formvariables >name=_&exact=F][getchars >start=2][name][/getchars]=[url][value][/url]&[/formvariables]startat=[ >startat]][founditems]

>value=[startat]>[description]
[/founditems] [showif [numfound]>1] > >[math show=f]ShowNextCount=1[/math] >[shownext method=post] >[showif [startat]=[math][start]-1[/math]] >[hideif [start]!1] >[ShowNextCount] | >[math show=f]ShowNextCount=[ShowNextCount]+1[/math] >[/hideif] >[/showif] >href=journal_photos.tpl?max=1&startat=[start]&db=../admin/rt_journal_ >images.db&[formvariables][name]=[value]&[/formvariables]> >[ShowNextCount] | [math >show=f]ShowNextCount=[ShowNextCount]+1[/math] >[showif [startat]=[math][start]+1[/math]] >[ShowNextCount] | >[math show=f]ShowNextCount=[ShowNextCount]+1[/math] >[/showif] >[/shownext] >[/showif] >[/search] > > >The journal_photos.tpl page is accessed from the main page via this href: >href=journal_photos.tpl?startat=1&_eqarticle_skudata=[article]&_max=1 >>View Photos > > >Here's the problem: when the journal_photos.tpl page is displayed the >first time the numbers linking to other photos display a link that >contains a [startat] that is 1 greater than the actual number. >Example: href=journal_photos.tpl?max=1&StartAt=2&db=../admin/rt_journal_images >.db&StartAt=1&_eqarticle_skudata=18&_max=1>1 > >You can see that the number being displayed is 1 but the StartAt >value is 2. If you click on the 1, image #2 is displayed and all the >numbers below display the _correct_ corresponding startat value. With >this being the case, a number is missing. Although 7 photos may be >associated with this story, only 6 numbers are displayed below (all >with an href offset of 1). > >Why is the first page getting a false startat value? > >If this isn't making sense to anyone, I can post a URL to review. _______________________Clint Davis Gray Loon Marketing Group 812.422.9999cdavis@grayloon.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/ Clint Davis

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:

[WebDNA] test (2011) process code only if accessed via POST (2006) Cookies (2003) problems with WebCat-Plugin () [shownext max=?] armed (1997) & in grep (2003) WebCat/CyberStudio Compatibility (1998) [WebDNA] Cannot amend WebDNA prefs (2011) Appendfile memory usage (redux) (2003) Can this be done? (1997) What happened to my erbcatalogengine folder? (2001) Re:Merging databases (1997) WebCat2.0 acgi vs plugin (1997) WCS Newbie question (1997) WebDNA Stops Running (2006) WebCat2final1 crashes (1997) form data submission gets truncated (1997) different ship dates and shopping carts -- how to? (1997) Frames and WebCat (1997) calculating time (2002)