We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    Quote from: kylej at Mar 18, 2006, 03:07 PM


    Updated: 05/18/2006 - I have added the code from Thomas (Shadock) to the main snippet to allow for live searching (i.e. results as you type). There is a new parameter that goes along with this. If you add the parameter &ajaxSearchType=`1` you will turn on the live search. I have also updated the scriptaculous effects to run in succession so the effects look better.


    Fyi - I have updated the code to include live searching!

    Here is the oringinal work from Thomas (Shadock) http://modxcms.com/forums/index.php/topic,4619.0.html that I used to include this.

    Kyle
      • 15987
      • 786 Posts
      Quote from: le_block at May 18, 2006, 11:26 AM

      got the search working (FlexSearch), but not with the nifty ajaxsearh and the fancy transitions.
      There is no loading.gif, no close.png etc. All the files in assets/snippets/AjaxSearch will not be loaded.
      I guess the AjaxSearch-snippet will not work in the right way and so there is no including of these files.

      Can you post your snippet call, that might help. Also a link to the site you are using on so I can see any errors.

      Quote from: le_block at May 18, 2006, 11:26 AM

      Of course, jacascript is activated. got a nice moo.fx-menu running.

      I’m not sure but having moo.fx and scriptaculous.js on the same page may be the reason it doesn’t work.

      If you want to try running the search on a page by itself (without the moo.fx files in the header) you could see if it is confliting.

      Kyle
        • 17058
        • 80 Posts
        @kyle

        moo.fx isn’t the problem. I comment out all the moo-stuff and the AjaxSearch did’nt work.
        the major problem is, the AjaxSearch-snippet will not be initialized by the [!AjaxSearch!] call in my template.
        with the help of the web-developer-toolbar i observed the Javascript. and no AjaxSearch.js will shown.

        That’s why there is no prototype, no scriptaculous -> no images, no dom-manipulation -> a.s.o.
        I guess it’s more a server issue...

        le block
          le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
          • 15987
          • 786 Posts
          le_block,
          In the code I am using functions from the api to setup the javascript. In modx version 0.9.1 these items do not work correctly. I would suggest upgrading to 0.9.2.1 and then it should work. If you are not goign to upgrade (it is highly recommended though) here is a link to the fix for 0.9.1

          http://modxcms.com/forums/index.php/topic,1942.msg28591.html#msg28591

          Kyle
            • 17058
            • 80 Posts
            @kyle

            thanks a lot. a got the upgrade on my schedule for tomorrow. in germany is 9pm. wink
            le block
              le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
              • 15987
              • 786 Posts
              Sounds good laugh Let me know if you still have any trouble after the upgrade.

              Kyle
                • 17058
                • 80 Posts
                thanks again: Everythink on the AjaxSearch works fine. There where no problems during the upgrade.

                But the Search_highlight plugin gives a error.
                The searchcall is : [!AjaxSearch? &ajaxSearch=`1` &ajaxSearchType=`0`&extract=`1` !]
                That means the highlighting is on. the text and link "remove highligthing" is shown by the plugin.
                By clicking on "remove.."-link it gives an error (404).
                That’s why the uri changes from localhost/mydomain/index.php?id=17&searched=test&highlight=AS_ajax_highlight+AS_ajax_highlight1
                to localhost/mydomain/17.

                whats wrong?

                btw:maybe it’s neccessary to extend the readme.txt in the ajaxSearch.zip with a little hint for the beginners.
                The definition of the CSS of span .AS_ajax_highlight / AS_ajax_highlight1 is not given.

                There is a last coding question left. Inspite of using the rotating indicator.gifs (beside the input-field)i wanna use a loading_bar.gif (80px -beneath the input-field). So, there is a need for an extra div ("thinking" for example). and by chance it could be fade-in, fade-out wink .
                So maybe one of you guys (and gals) is able to modify the AjaxSearch.js (because i don’t grin)

                thanks, le block


                  le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
                  • 15987
                  • 786 Posts
                  Quote from: le_block at May 29, 2006, 10:27 AM

                  whats wrong?

                  Give the attached file a try. I think it should fix your error.


                  Quote from: le_block at May 29, 2006, 10:27 AM

                  btw:maybe it’s neccessary to extend the readme.txt in the ajaxSearch.zip with a little hint for the beginners.
                  The definition of the CSS of span .AS_ajax_highlight / AS_ajax_highlight1 is not given.

                  I will try to get to this soon. I am working on some other projects that are taking up my time currently.


                  Quote from: le_block at May 29, 2006, 10:27 AM

                  There is a last coding question left. Inspite of using the rotating indicator.gifs (beside the input-field)i wanna use a loading_bar.gif (80px -beneath the input-field). So, there is a need for an extra div ("thinking" for example). and by chance it could be fade-in, fade-out wink .
                  So maybe one of you guys (and gals) is able to modify the AjaxSearch.js (because i don’t grin)

                  I am going to be setting up a template system so you can have it output however you want. But again this has to wait until I get some other things done. Until then, you may try using some css to get the image on a new line. Maybe use display:block;

                  Let me know if the attached file fixed your problem.

                  Kyle
                    • 17058
                    • 80 Posts
                    A big (modX-user)-hug and a great thank to you. You made my day.
                    Now it works like a charm.

                    ..and don’t hurry.... wink

                      le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
                      • 15987
                      • 786 Posts
                      Glad I could help grin

                      I have updated the first post to include the fixed file.

                      Kyle

                      This discussion is closed to further replies. Keep calm and carry on.