We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31290
    • 37 Posts
    I am having problems with the Ajax Search showing HTML formatting when the results are returned.

    The weird thing is, this only happens when there is more than one search term.

    I have been digging through the PHP scripts trying to find a solution but I don’t even know where to start. Any help would be greatly appreciated!

    To see an example of what I mean:
    Go to the website I am working on: http://www.vanmeterindustrial.com/index.php?q=100

    Type in "Automation Fair" for the search terms. You will notice a few of the results show HTML formatting (based on the span CSS style)

    If you type in either "Automation" or "Fair" as the search term, this problem does not exist. It only occurs when more than 1 word is used in the search.

    Thanks in advance for any help!
      • 10449
      • 956 Posts
      I don’t see any results at all o_O
        • 5811
        • 1,717 Posts
        hi vanMeter,

        Like GaneshXL (Extra Long Ganesha ? grin) is don’t see any results when i use fair automation as search strings !

        Have you any documents which includes the words "fair" or "motion" ?

        On http://www.wangba.fr/accueil_livres_voyage.html, as example type "muraille chine" and you will find several results.

        If you would like find only "fair motion" instead of "fair" and/or "automation" search the followings lines in your snippet code :
            // $useAllWords [ 1 | 0 ]
            // If you want only documents which contain ALL words in the search string, set to true. 
            // Otherwise, the search will return all pages with ONE or more of the search words (which can be a LOT more pages).
            'useAllWords' => 0,

        And try to change ’useAllWords’ => 0 by ’useAllWords’ => 1

        Let me know the results.
          • 31290
          • 37 Posts
          I do have "Automation" and "Fair" on multiple pages within my website. Try searching without using the quotes. And make sure you are typing it correctly maybe?

          It should come up with quite a few results, it does on my browsers (Firefox/2.0.0.11 & IE/7.0.5730.11)

          The problem I am running into is the search results showing CSS styling on the results. And I can’t get it to remove this CSS formatting.

          If you can’t get the search term:
          Automation Fair

          to bring up any results, try the terms:
          Line Card

          Both of these should bring up results showing CSS formatting where it shouldn’t show any formatting (like it does when only searching one word)

          I attached a screen shot to show you what I mean...

          Results are fine when searching one word:


          Results show CSS formatting when searching for two words:
            • 4310
            • 2,310 Posts
            I can’t get any results for any term!

            David
              • 31290
              • 37 Posts
              What does it do when you search?
                • 4310
                • 2,310 Posts
                The page seems to refresh but nothing changes.
                Tried the terms : line, test, auto, search.
                No message saying "No results" absolutely nothing!
                The styling seems to have suddenly changes as well.
                  • 31290
                  • 37 Posts
                  I am completely confused. Why would the results appear any differently on my computer than they would on yours?
                    • 31290
                    • 37 Posts
                    I turned off my JavaScript and I am receiving the same results as you are. Try enabling JavaScript as this is an Ajax Search.
                      • 4310
                      • 2,310 Posts
                      I have JavaScript enabled.
                      I’ve tried it in IE7, Opera & FF2
                      I’ve just tried again with Firebug running and it gives an error
                      Window.onDomReady is not a function
                      [Break on this error] Window.onDomReady(activateSearch);

                      I noticed you have prototype, mootools, ajaxsearch & menu JavaScript calls in the head section.
                      Could be a conflict?
                      Also have you got the page set to not cache?
                      Just to make things worse your menu doesn’t work in Opera, see attached jpeg.
                      Sorry!
                      David