We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    I recall reading something about this, but this thread is so big and search doesn’t return so I’ll ask (possibly again) : is there a way with 1.7.1 to set up two ajaxSearch calls on the same page ?

    Reason I ask is I have the default search to search all pages, and I need, for one page, to use a search with &parents.

    Is that doable or should I tweak my "global search" not to appear on that page ?
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 5811
      • 1,717 Posts
      is there a way with 1.7.1 to set up two ajaxSearch calls on the same page ?

      Reason I ask is I have the default search to search all pages, and I need, for one page, to use a search with &parents.

      Is that doable or should I tweak my "global search" not to appear on that page ?
      Unfortunately Ajaxsearch doesn’’t allow multiple instances on a same page. The parameters like &parents used by ajaxSearch are not related to a specific instance of a form.
      With two AS calls, I think that javascript parameters like &parents are overwritten by the last call. So in this case you will have two js variables initialized, but only the last one will be used. Do the tests and let me know
        • 6726
        • 7,075 Posts
        Well, the call with &parents is the last call but what happens is when I start typing in the call with &parents, it takes me to the global form... also it screws up the other jquery effects I have in there no matter that I used the noconflict() function tongue Probably I should tweak tpls and assign some different css IDs but don’t worry, I’ll stay practical and just do some conditionnal testing and disable global search for that page, no big deal...
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id