Re: ShowNext - This is Killing me!

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18411
interpreted = N
texte = Hi John,When you're posting WebDNA code in complicated pages like this, it's often a good idea to get rid of all the extra HTML that has nothing to do with the WebDNA code. Then those of us who might be interested in helping you will not become discouraged by having to wade thru a bunch of html crap in order to get to the WebDNA code that needs fixing ...In other words, here's a simplified way to post your lengthy request -- making it far easier for us to help you before we get discouraged by the volume of html and end up skipping your request entirely ... Heres the code on page index2.tpl ... (Or is this code actually found on some other page? You never posted the name of the page this code appears on, so I'm making a huge assumption here.)[search db=MajorCategories.db&neMajordata=0&descriptionsort=1] [foundItems] [search db=Subcategories.db&bwMajordatarq=[Major]] [foundItems] [Description]
[/foundItems] [/search] [/foundItems] [/search] Here is the code on page index3.tpl. Nothing inside the [shownext] context appears on the page. What am I doing wrong?[founditems] [lookup db=VendorSpecs.db&value=[sku]&lookinfield=sku&returnfield=title¬found=NotFound] [SKU] [PRICE] [/foundItems][shownext] Show Items [start]-[end] [/shownext]Okay, that's the end of my example. With this simplified code I can instantly see two things you should change:1- In your URL-based search strings, change &search to ?command=search. 2- Use this shownext code instead of what you're currently using:[shownext] Show Items [start]-[end] [/shownext]As far as the shownext links not appearing, the search is pronbably not retrieving more than 12 records, and in that case no shownext links will appear -- because the search is limited to 12 matching records. Shownext links only appear when the number of records retrieved *exceeds* the max value in your search string.During testing you should always set your max value to 1, because this forces WebCat to create shownext links that you can see whenever the search returns more than a single matching record. Then after you're done testing, reset the max value to whatever you really want it to be.During testing, you might also think about putting a [numfound] tag at the top of the results page, just to make sure you *always* know exactly how many records are actually being retrieved ... :)Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Associated Messages, from the most recent to the oldest:

    
  1. Re: ShowNext - This is Killing me! (Kenneth Grome 1998)
  2. ShowNext - This is Killing me! (John Kennedy 1998)
Hi John,When you're posting WebDNA code in complicated pages like this, it's often a good idea to get rid of all the extra HTML that has nothing to do with the WebDNA code. Then those of us who might be interested in helping you will not become discouraged by having to wade thru a bunch of html crap in order to get to the WebDNA code that needs fixing ...In other words, here's a simplified way to post your lengthy request -- making it far easier for us to help you before we get discouraged by the volume of html and end up skipping your request entirely ... Heres the code on page index2.tpl ... (Or is this code actually found on some other page? You never posted the name of the page this code appears on, so I'm making a huge assumption here.)[search db=MajorCategories.db&neMajordata=0&descriptionsort=1] [founditems] [search db=Subcategories.db&bwMajordatarq=[Major]] [founditems] [username]&password=[password]&db=catalog.txt&eqMerchandiserdata=D&Category=[bothcategories]&max=12&pricesort=1&pricesdir=as&pricetype=num>[Description]
[/foundItems] [/search] [/foundItems] [/search] Here is the code on page index3.tpl. Nothing inside the [shownext] context appears on the page. What am I doing wrong?[founditems] [url][lookup db=catalog.txt&value=[sku]&lookinfield=sku&returnfield=sku¬found=NotFound][/URL].gif> [lookup db=VendorSpecs.db&value=[sku]&lookinfield=sku&returnfield=title¬found=NotFound] [SKU] [PRICE] [/foundItems][shownext] Show Items [start]-[end] [/shownext]Okay, that's the end of my example. With this simplified code I can instantly see two things you should change:1- In your URL-based search strings, change &search to ?command=search. 2- Use this shownext code instead of what you're currently using:[shownext] [thisurl]?[searchstring]>Show Items [start]-[end] [/shownext]As far as the shownext links not appearing, the search is pronbably not retrieving more than 12 records, and in that case no shownext links will appear -- because the search is limited to 12 matching records. Shownext links only appear when the number of records retrieved *exceeds* the max value in your search string.During testing you should always set your max value to 1, because this forces WebCat to create shownext links that you can see whenever the search returns more than a single matching record. Then after you're done testing, reset the max value to whatever you really want it to be.During testing, you might also think about putting a [numfound] tag at the top of the results page, just to make sure you *always* know exactly how many records are actually being retrieved ... :)Sincerely, Ken Grome 808-737-6499 WebDNA Solutions mailto:ken@webdna.net http://www.webdna.net Kenneth Grome

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:

Database wiped clean (2005) WebCat2 - Getting to the browser's username/password data (1997) The code, one more time. (2003) URL for Discussion Archive (1997) emailer setup (1997) RE: type 2 errors with ssl server (1997) [WebDNA] Ubuntu 11.10 (2012) WebCat2 beta 11 - new prefs ... (1997) Date format problems (1997) [OT] Forums - check it out (2005) Multiple 'Users.db' files not possible (1997) Re:Emailer tracking (1997) Error Lob.db records error message not name (1997) Protecting Realms (1998) No luck with taxes (1997) How many Databases can I open? (2003) Date search - yes or no (1997) RE:It just Does't add up!!! (1997) No Data Results (1997) [WebDNA] Has anyone used 'bootstrap' as their base to create a (2016)