Re: PCS search results page

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18384
interpreted = N
texte = >>>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.net Associated Messages, from the most recent to the oldest:

    
  1. Re: PCS search results page (Jay Van Vark 1998)
  2. RE: PCS search results page (Peter Kohl 1998)
  3. Re: PCS search results page (Kenneth Grome 1998)
  4. Re: PCS search results page (Terry Wilson 1998)
  5. Re: PCS search results page (PCS Technical Support 1998)
  6. PCS search results page (Terry Wilson 1998)
>>>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.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:

WebCat Code and WebStar Search? (2000) FW: Shipping calculations (1997) Re:Running 2 two WebCatalog.acgi's (1996) Wrapping text (1998) CheckDigit (2005) Extended [ConvertChars] (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) [Summary] re: Emailer setup (1997) calculating tax rates, mail order solutions and version 2 (1997) ALL CAPS converted to All Caps - first letter capitalizedonly (2002) Bug or syntax error on my part? (1997) SORRY (1997) formvariables not passing (2000) WebCat2b13MacPlugIn - [include] (1997) Problem with updating to 2.1.1 (1998) [DOS] (1999) Y2k compliance (1998) Big Databases (1997) [WebDNA] sum in a search (2009) Talk List Suggestions (1997)