Re: PCS search results page
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 18391
interpreted = N
texte = Have you tried Your search for [formvariables name=yourcheck][value][/formariables]?>>>>Whoever does the web pages there at PCS, would you mind sharing the webdna>>>>at the top of the WebCat Talk archives search results page, the part that>>>>says ' 100 messages found containing 'stuff you typed'. I finally got it>>>>to work on my page, but it only returns the first keyword, not all of them.>>>>>>This is usually because your hyperlink href has spaces in it. If you hover>>>over your hyperlink and see spaces instead of %20 in the URL, then that>>>means you need to add a [URL] around the [group1data] in the
(not in>>>the sentence Your search of [group1data], because that's just being>>>displayed on a page and not a link in a browser, so spaces are fine there).>>>>It's a form based search, so there's no . Sorry, I guess my case is>>different from PCS's search page anyway. I have a series of checkboxes, all>>name=group1data, as well as a type-in field also named group1data. It only>>recognizes the first checked box. If no boxes are checked, and they enter a>>series of words in the text input field, it will pick up all of those>>words.>>>Hi Terry,>>Your search will work fine the way you've done it -- with all the>checkboxes (and your input field) having the same name -- but this is a>bad practice to get into, and besides, it's technically *not* the correct>method of creating a search form. The correct method is to give each>checkbox and input field a unique name ... which is why I made this>suggestion in my previous response message posted to the list.>>The problem you're running into is just one of several limitations>inherent in doing things the *short cut* way instead of doing things the>*right* way.>>You simply cannot display all the search parameters at the top of the>results page if you use a single field name in your form for several>different search parameters.>>Even though WebCat is willing to concatenate all your same-name>[fieldname] values into a single search parameter (thus making it easy for>you to use a single field name with checkboxes), WebCat doesn't have any>idea *which* of those values it is supposed to display on the results page>when you place a [fieldname] tag on the top of that page like this:>>Your search for [fieldname] found [numfound] matching items:>>Sure, WebCat sees a [fieldname] tag at the top of your results page ...>but since you created several DIFFERENT values for [fieldname] in your>search form, WebCat doesn't know which of those values you wish to display>...>>Should it use the *first* value of [fieldname] you created in your form?>Or should it use the second value? Or the third? Or the fourth?>>Since WebCat doesn't know which one to use, it uses the first value it>finds. And that's why you are NOT getting all your search parameters>displayed whenever more than one field is used in your search.>>Therefore, the only way for you to *properly* deal with this situation is>to start over, and use a different name for each input field and checkbox>on your form:>>1- Re-write your HTML form so that it uses a different field name for each>checkbox and each input field. Don't use these same name shortcuts>anymore, they only create potential problems ...>>2- Change your search string so that it deals with each of the individual>checkbox and field names you've placed into your form.>>3- Change the line at the top of your results page from Your search for>[fieldname] found [numfound] matching items: to something like:>>Your search for [inputfield1] [inputfield2] [checkbox1] [checkbox2]>[checkbox3] [checkbox4] [checkbox5] [checkbox6] [checkbox7] found>[numfound] matching items:.>>Following these suggestions will actually solve your problems ... :)>>Sincerely,>Ken Grome>808-737-6499>WebDNA Solutions>mailto:ken@webdna.net>http://www.webdna.netJay Van Vark *******************************Pacific Coast Software | eCommerce (WebCatalog)11770 Bernardo Plaza Court | Site Hosting & DevelopmentSuite 453 | http://www.smithmicro.comSan Diego, CA 92128 *******************************619.675.1106** PGP key available upon request. **
Associated Messages, from the most recent to the oldest:
Have you tried Your search for [formvariables name=yourcheck][value][/formariables]?>>>>Whoever does the web pages there at PCS, would you mind sharing the webdna>>>>at the top of the WebCat Talk archives search results page, the part that>>>>says ' 100 messages found containing 'stuff you typed'. I finally got it>>>>to work on my page, but it only returns the first keyword, not all of them.>>>>>>This is usually because your hyperlink href has spaces in it. If you hover>>>over your hyperlink and see spaces instead of %20 in the URL, then that>>>means you need to add a [url] around the [group1data] in the (not in>>>the sentence Your search of [group1data], because that's just being>>>displayed on a page and not a link in a browser, so spaces are fine there).>>>>It's a form based search, so there's no . Sorry, I guess my case is>>different from PCS's search page anyway. I have a series of checkboxes, all>>name=group1data, as well as a type-in field also named group1data. It only>>recognizes the first checked box. If no boxes are checked, and they enter a>>series of words in the text input field, it will pick up all of those>>words.>>>Hi Terry,>>Your search will work fine the way you've done it -- with all the>checkboxes (and your input field) having the same name -- but this is a>bad practice to get into, and besides, it's technically *not* the correct>method of creating a search form. The correct method is to give each>checkbox and input field a unique name ... which is why I made this>suggestion in my previous response message posted to the list.>>The problem you're running into is just one of several limitations>inherent in doing things the *short cut* way instead of doing things the>*right* way.>>You simply cannot display all the search parameters at the top of the>results page if you use a single field name in your form for several>different search parameters.>>Even though WebCat is willing to concatenate all your same-name>[fieldname] values into a single search parameter (thus making it easy for>you to use a single field name with checkboxes), WebCat doesn't have any>idea *which* of those values it is supposed to display on the results page>when you place a [fieldname] tag on the top of that page like this:>>Your search for [fieldname] found [numfound] matching items:>>Sure, WebCat sees a [fieldname] tag at the top of your results page ...>but since you created several DIFFERENT values for [fieldname] in your>search form, WebCat doesn't know which of those values you wish to display>...>>Should it use the *first* value of [fieldname] you created in your form?>Or should it use the second value? Or the third? Or the fourth?>>Since WebCat doesn't know which one to use, it uses the first value it>finds. And that's why you are NOT getting all your search parameters>displayed whenever more than one field is used in your search.>>Therefore, the only way for you to *properly* deal with this situation is>to start over, and use a different name for each input field and checkbox>on your form:>>1- Re-write your HTML form so that it uses a different field name for each>checkbox and each input field. Don't use these same name shortcuts>anymore, they only create potential problems ...>>2- Change your search string so that it deals with each of the individual>checkbox and field names you've placed into your form.>>3- Change the line at the top of your results page from Your search for>[fieldname] found [numfound] matching items: to something like:>>Your search for [inputfield1] [inputfield2] [checkbox1] [checkbox2]>[checkbox3] [checkbox4] [checkbox5] [checkbox6] [checkbox7] found>[numfound] matching items:.>>Following these suggestions will actually solve your problems ... :)>>Sincerely,>Ken Grome>808-737-6499>WebDNA Solutions>mailto:ken@webdna.net>http://www.webdna.netJay Van Vark *******************************Pacific Coast Software | eCommerce (WebCatalog)11770 Bernardo Plaza Court | Site Hosting & DevelopmentSuite 453 | http://www.smithmicro.comSan Diego, CA 92128 *******************************619.675.1106** PGP key available upon request. **
Jay Van Vark
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:
Emailer (1999)
[WebDNA] multi hyperlinks in text paragraphs (2014)
[WebDNA] sort parameters in search (2015)
[Listfiles] vs Netfinder (1997)
Yet another db manager (2004)
hideif/showif causes error if wrapped around searches (2003)
Almost a there but..bye bye NetCloak (1997)
WebCat2 - [format thousands] (1997)
E-mail problem... (1999)
headers (2004)
Getting total number of items ordered (1997)
Extended [ConvertChars] (1997)
Emailer port change (1997)
FYI: virus alert (1996)
encrypt but with normal characters for result? (2005)
Re[2]: Next X hits (1996)
Database Updates (1997)
Email (1998)
WebCat2b13MacPlugin - nested [xxx] contexts (1997)
[isfolder] and [filename] (1997)