We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5644
    • 78 Posts
    Why when I Use Ajax Search (called by [[AjaxSearch? &AS_landing=`42` &AS_showResults=`0` &addJscript=`0` &extract=`1`]])
    I get JS error

    [tt]JavaScript - http://site/index.php?id=48
    Inline script thread
    Error:
    name: TypeError
    message: Statement on line 159: Type mismatch (usually a non-object value used where an object is required)
    Backtrace:
    Line 159 of linked script http://SITE/assets/snippets/AjaxSearch/AjaxSearch.js
    Event.observe(window, "load", activateSearch, false);
    [/tt]

    WHat Should I do to fix error?
      • 15987
      • 786 Posts
      What version are you using? That looks like a previous version as the latest does not use the event.observe line.

      Make sure you have the most recent version and if you are not including the mootools js library in your page header, do not set &addJscript=`0`
        • 5644
        • 78 Posts
        The new version of Ajax Search doesn’t work with russian characters. So I use 1.1
          • 15987
          • 786 Posts
          This is most likely a MooTools compatibility issue. There are some fixes in the AjaxSearch thread that will get your Russian characters working. It will be included with 0.9.6.1
            • 5644
            • 78 Posts
            Sorry for (may be) stuppid questions, but what should i do now? And is there any security roblems in old version of AjaxSearch? Thanks
              • 15987
              • 786 Posts
              There were no security problems that I can remember. If you go to the AjaxSearch thread you can find the fixes to the code that will make 2.0 work for you.