We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    Quote from: mmjaeger at Jan 17, 2007, 07:24 AM

    I’m kind of struggling with this as well - is it possible to have the search form as well as the result on the same page - if yes, I’d appreciate if somebody could give me an example.
    You can do this in two ways. If you want to use the search field and display the results directly beneath it, just use the call [!AjaxSearch!]

    If you want to use the search field somewhere and display the results elsewhere (i.e. in 2 different divs) then you can use the procedure described above, only use the ID of the same page as landingpage. For example, if the ID of your page is 8, use these calls in the different places on the same page:
    For the searchfield: [!AjaxSearch? &AS_showResults=`0` &ajaxSearch=`0` &AS_landing=`8`!]
    And for the results: [!AjaxSearch? &AS_showResults=`1` &AS_showForm=`0`!]

    Quote from: mmjaeger at Jan 17, 2007, 07:24 AM

    Moreover, I can’t get the ajax version of the script to work - if I enable immideate search while I’m typing, I get an AJAX error. Another issue is when I click on that ugly button that clears the result area, I get a javascript error.

    Am I doing something wrong?
    Well, I had problems with AJAX errors too and I found the solution in the support thread for AjaxSearch. You should call AjaxSearch uncached on a cached page (as the examples above do). And I corrected the errors which were described here: http://modxcms.com/forums/index.php/topic,5357.msg46411.html#msg46411
    Since then I haven’t had any problems with AjaxSearch smiley

    And yes, the button that clears the result area (and stops AjaxSearch from working!) is ugly, but you can change that wink
      • 19889
      • 616 Posts
      Thank you for getting back to me - while the ajaxsearch works, clicking on the clear button results in a javascript error and new searches don’t work anymore - unfortunately, I couldn’t find a solution to this problem yet.
        • 19889
        • 616 Posts
        Quote from: mmjaeger at Jan 17, 2007, 12:53 PM

        Thank you for getting back to me - while the ajaxsearch works, clicking on the clear button results in a javascript error and new searches don’t work anymore - unfortunately, I couldn’t find a solution to this problem yet.

        I might got a little closer to the problems I’m experiencing - the ajaxsearch only works if I’m not logged into the manager due to incompatibility of prototype and mootools - no problem with that.

        Another problem I experienced is the following - let’s say I have a search term like this: "Trösch" (please not the German umlaut) - I’m getting an error in IE: EXCEPTION AJAX: The URI to be decoded is not valid encoding - Firefox returns no results although there are search terms.

        I hope there is a solution to those problems.

        Thank you in advance for your help.
          • 22303 MODX Staff
          • 10,725 Posts
          URI’s/URL’s cannot contain extended characters outside of the US-ASCII character set unless they are encoded. This would appear to me to be the problem causing your IE: EXCEPTION AJAX.

          As for the QuickEdit conflicts with AjaxSearch, you could disable QuickEdit to avoid the conflict. A mootools version of QuickEdit is in the works...
            • 19889
            • 616 Posts
            Quote from: OpenGeek at Jan 18, 2007, 08:48 AM

            URI’s/URL’s cannot contain extended characters outside of the US-ASCII character set unless they are encoded. This would appear to me to be the problem causing your IE: EXCEPTION AJAX.

            As for the QuickEdit conflicts with AjaxSearch, you could disable QuickEdit to avoid the conflict. A mootools version of QuickEdit is in the works...

            thanks for your feedback - I hope there is a solution to convert a user input like "Trösch" to
            Trösch
            - it is not very user-friendly to tell a user not to enter any special characters like German umlauts.
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: mmjaeger at Jan 18, 2007, 08:55 AM

              thanks for your feedback - I hope there is a solution to convert a user input like "Trösch" to
              Trösch
              - it is not very user-friendly to tell a user not to enter any special characters like German umlauts.
              The search string just needs to be urlencoded...
                • 19889
                • 616 Posts
                I tried that, but didn’t work
                  • 21800
                  • 174 Posts
                  strange - discussion (support) always stops at this point


                  (look at modx Start page: MODx is the alternative to hacking blogging tools and other tools to death ...)
                    • 15987
                    • 786 Posts
                    Quote from: nos at Jan 25, 2007, 03:30 AM

                    strange - discussion (support) always stops at this point


                    (look at modx Start page: MODx is the alternative to hacking blogging tools and other tools to death ...)

                    thanks for offering some assistance here and not just bashing the free time we give up to try and support this system.
                      • 21800
                      • 174 Posts
                      Sorry, kylej, I didn’’t want this "assistance" to be understood as bashing. and believe me I’ve greatest respect for people like you, who spend time, competence and inovation in this great development.
                      But not everyone is a coder. From the context of practical use do also come ideas and some puzzle even the user is an author/designer. I’m now puzzling around with this for weeks, trying to get a base for my work, thinking modX is fitting best with my needs for an elegant cms.

                      So what about the (Ajax)Search now? I think I’ve experienced some inconsistencies (on my install) with it:

                      • User and manager search seem to work differently regarding special chars like "Umlaute, ö, ä, ü, ß"
                      • i. e. manager search finds some in longtitle but not in title, some in content ...
                      • AjaxSearch mostly finds them not
                      • if AS finds them it does not display them correctly in the results div (but it does on the "more page")

                      The installation is set to utf-8 (sql too), FCK editor saves pages with html entities (quick edit not tested yet), but that does not seem to cover the problems with manager search and results div display.

                      How I have to tune my installation to work propperly also with special chars like "Umlaute"?