We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30134
    • 7 Posts
    Hello,

    I’m using AjaxSearch in "non-ajax" mode, with a target document properly defined. Everything works as expected, except for one little snag.

    Whenever a search is performed with the form residing on a document within a parent container, the AS_landing page is not found and the search results are returned within my 404 page.

    Question: Is there a way to configure AjaxSearch, in non-ajax mode, to display the search results within the AS_landing page, even if the AS_landing page document isn’t within the current document container?

    Thanks,

    Tom
      • 5811
      • 1,717 Posts
      Whenever a search is performed with the form residing on a document within a parent container, the AS_landing page is not found and the search results are returned within my 404 page.

      Question: Is there a way to configure AjaxSearch, in non-ajax mode, to display the search results within the AS_landing page, even if the AS_landing page document isn’t within the current document container?
      Check your snippet call. The landing page is not necessary in the same document container of the page where the input form is.

      Thanks to post your snippet call here, i will check it later.
        • 30134
        • 7 Posts
        coroico,

        Thanks for the reply. Here is my call...

        [!AjaxSearch? &ajaxSearch=`0` &AS_landing=`8`!]

        Tom
          • 5811
          • 1,717 Posts
          Tom,

          AS_landing page is not found
          Is your page #8 published ?
          and what is the AjaxSearch Snippet call on this page ?
            • 30134
            • 7 Posts
            This is the snippet on the search results page. The page is published.

            [!AjaxSearch? &AS_showForm=`0` &ajaxSearch=`0`!]
              • 5811
              • 1,717 Posts
              and the search results are returned within my 404 page.
              Are you sure that your page 8 could be reached ?

              Otherwise to test that the correct post has been sent, install the plugin httpfox on firefox : https://addons.mozilla.org/en-US/firefox/addon/6647
              open the console, execute the search and look at the first request sent. Then copy this request and execute it in your browser.

              Is your site in production ? Have you an URL to reach it ? I could do the test for you.
                • 30134
                • 7 Posts
                coroico,

                Nice tool, reminds me of Firebug, only easier to use.

                It’s a 404 error, with the search document being requested from within the container that I am currently in, rather than off of the site root, where the document resides. The search works fine everywhere else, retrieving the search-results document properly, as long as I am not executing the search form from within a document inside a container. For lack of a better explanation, it a relative path issue within the document tree.

                Unfortunately, the site doesn’t do live for another week.

                Thanks.

                Tom