We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3767
    • 40 Posts
    Is there something wrong with this ajaxSearch string? Its installed in my sites template, if that has anything to do with it.

    [!AjaxSearch? $introMessage=`` &boxText=`` &searchButtonText=`Find`!]


    :(

    What I want is for it to say nothing underneath it until it searches...I also want to get rid of the loading gifs if possible (the little red botton and spinning animation..)
      • 25663 MODX Staff
      • 12,272 Posts
      Try nuking the space after the "?".
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Or try using & instead of $ for the arguments.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 3767
          • 40 Posts
          Tried those to no avail. I been moving the syntax around for hours, heh, no change. Could it possibly have something to do with the template?

          <head>
          	<title>[(site_name)] - [*pagetitle*]</title>
          	<meta http-equiv+"Content-Type" content="text/html; charset=utf-8" />
          	<link href="style1.css" rel="stylesheet" type="text/css" />
          </head>
          	<body>
          	<div id="header">
          		<div id="branding"><h1>the Star * Junction</h1></div>
                                  <div id="search"><p>[!AjaxSearch?&introMessage=`Hello` &boxText=`Search Here` &searchButtonText=`Find`!]</p?</div>
          <div id="tagline"><p>[*longtitle*]</p></div>
          		</div><!-- end header div -->
          <div id="navigation">
          [[Wayfinder? &startId=`0` &level=`0`]]
          </div><!-- end Navigation div -->
          <div id="bodycontent">
          <p>[*content*]</p>
          
          	</div><!-- end of bodycontent div -->	
          	</body>
          </html>
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Ok, I see the problem. introMessage is not a snippet argument. You have to edit the snippet code at this point:
             // $introMessage [ string ]
               // This is the text that will show up if the person arrives
               // at the search page without having done a search first.
               // You can leave this as an empty string if you like.
               $introMessage = '';
            
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 3767
              • 40 Posts
              Quote from: sottwell at Jan 29, 2007, 09:29 AM

              Ok, I see the problem. introMessage is not a snippet argument. You have to edit the snippet code at this point:
               // $introMessage [ string ]
                 // This is the text that will show up if the person arrives
                 // at the search page without having done a search first.
                 // You can leave this as an empty string if you like.
                 $introMessage = '';
              


              Oh, interesting. Are none of those arguments then? I was going by the example calls in the code. Thanks, Ill try it!

              I dont know PHP at all (if thats even what this is)
                • 3767
                • 40 Posts
                And that was it, thanks a lot! Is there a way to get rid of the default animated .gif and stop button after you hit the search button, or at least a way to change them? I didnt see it in the options.
                  • 33372
                  • 1,611 Posts
                  You can edit those images in assets/snippets/AjaxSearch/AjaxSearch.js.
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                    • 3767
                    • 40 Posts
                    Quote from: ZAP at Jan 29, 2007, 10:13 AM

                    You can edit those images in assets/snippets/AjaxSearch/AjaxSearch.js.

                    Can you just get rid of them, or will that return an error?
                      • 33372
                      • 1,611 Posts
                      Probably the easiest way to do this is to replace them both with the same 1x1 pixel transparent gif (since you’d have to edit the JavaScript otherwise or I believe you would get an error message).
                        "Things are not what they appear to be; nor are they otherwise." - Buddha

                        "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options