We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13135
    • 30 Posts
    Hey guys...
    In all versions of IE I get a "done but with errors on page"

    In FF the error console says:
    s is null
    line:49
    assets/snippets/ajaxSearch/js/ajaxSearch.js


    Is there an error with the javascript or have I perhaps called the snippet wrong?
    Am on MODX 9.6.3 with AjaxSearch 1.8.1.

    My AS search call is:
    [!AjaxSearch? &AS_showResults=`0` &tplLayout=`search-form` &documents=`1,3,4,5,7,8,9,10,11,12,14,15,18,19,20,21` &AS_landing=`70` &advsearch=`exactphrase`!]

    Anyone else seen this?
    Any ideas?
      • 13135
      • 30 Posts
      With the kind help of coroico this has been solved.

      The error refers to a missing <div id="ajaxSearch_output"></div> from the search input chunk:

      The javascript issue comes from the fact that the script don't find the tag <div id="ajaxSearch_output"></div>.
      
      <div id="searchbox">
      <form id="ajaxSearch_form" method="post" action="search-results">
      <label for="ajaxSearch_input">
      <input id="ajaxSearch_input" type="text" onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" value="" name="search"/>
      </label>
      <label for="ajaxSearch_submit">
      <button id="ajaxSearch_submit" value="" type="submit" name="sub">Search</button>
      </label>
      </form>
      **************** here is missing : <div id="ajaxSearch_output"></div>.
      </div>