On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,
    I need to search in TV therefore I cannot use SimpleSearch. AdvSearch in non-ajaxmode works ok, but I want to show live searched result in float window under search form.
    [[!AdvSearchForm? &landing=`81` &tpl=`food.AdvSearchForm` &addJQuery=`0` &help=`0` &clearDefault=`1` &withAjax=`1`
        &ajaxResultsId=`364` &addJs=`0` &addCSS=`0` &liveSearch=`1`]]

    Adding JS is disabled because even with 1 it doesnt paste any code. So I pasted it manually.
    On page 364 I have empty template with call:
    [[!AdvSearch? &hideContainers=`1` &fields=`pagetitle` &hideMenu=`0` &includeTVs=`vyrobce,popis,main-img` &withFields=`pagetitle` &withTVs=`vyrobce,popis` &perPage=`20` &sortby=`pagetitle[ASC]` &minChars=`1` &ids=`[[GetOnlyChildren? &parent=`2` &depth=`3`]]`  &withAjax=`1`  ]]


    But it seems no js is loaded because it always return result to page 81...
    I have no idea what I am doing wrong...

    This question has been answered by kudykam. See the first response.

    • discuss.answer
      Found a problem...
      Under embeded javascript in head section, have to be this code:
      <script type="text/javascript">
      //<![CDATA[
      advsea[advsea.length]='{"asid":"as0","hid":"364"}';
      //]]>
      </script>


      where asid is name of search result (see rtfm) and hid is landing page...
      • Hello!
        I added this in my Template, so It does not work.
        The mistake is the following
        • Quote from: kudykam at Apr 19, 2013, 07:12 AM
          Hi,
          I need to search in TV therefore I cannot use SimpleSearch. AdvSearch in non-ajaxmode works ok, but I want to show live searched result in float window under search form.
          [[!AdvSearchForm? &landing=`81` &tpl=`food.AdvSearchForm` &addJQuery=`0` &help=`0` &clearDefault=`1` &withAjax=`1`
              &ajaxResultsId=`364` &addJs=`0` &addCSS=`0` &liveSearch=`1`]]

          Adding JS is disabled because even with 1 it doesnt paste any code. So I pasted it manually.
          On page 364 I have empty template with call:
          [[!AdvSearch? &hideContainers=`1` &fields=`pagetitle` &hideMenu=`0` &includeTVs=`vyrobce,popis,main-img` &withFields=`pagetitle` &withTVs=`vyrobce,popis` &perPage=`20` &sortby=`pagetitle[ASC]` &minChars=`1` &ids=`[[GetOnlyChildren? &parent=`2` &depth=`3`]]`  &withAjax=`1`  ]]


          But it seems no js is loaded because it always return result to page 81...
          I have no idea what I am doing wrong...



          Does it work whitout JS?
          I copied the code and I changed Ids and It does not Work...