We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17717
    • 433 Posts
    Hi all,

    I’m pretty sure this is not a specific AjaxSearch query but I am trying to use it with AjaxSearch, apologies if it is the wrong area to post it:

    I want to know how I can remove the Search here... text when a user put their cursor in the search box?

    Thanks
    Lee
      http://www.blend.uk.com | Web Design by Blend
      • 17717
      • 433 Posts
      Looking in the snippets code I found this:

         // $boxText [ string ]
         // What, if anything, you want to have in the search box when the
         // form first loads. When clicked, it will disappear. This uses
         // JavaScript. If you don't want this feature or the JavaScript,
         // just set to empty string: ''
         $boxText = 'Search here...';


      So it should already delete the text but relies on javascript. I’m sure I have javascript enabled??? Anyway, can this not be done without Javascript?
        http://www.blend.uk.com | Web Design by Blend
        • 28215
        • 4,149 Posts
        Quote from: lw-d at Jan 25, 2007, 03:11 PM

        So it should already delete the text but relies on javascript. I’m sure I have javascript enabled??? Anyway, can this not be done without Javascript?

        It cannot be done without javascript.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 17717
          • 433 Posts
          Ok thanks, do you know if there is any reason why my text isn’t getting deleted? You don’t have to activate it in the snippet do you? I have checked if I have JavaScript enabled in FF and I do?

          Thanks
          Lee
            http://www.blend.uk.com | Web Design by Blend
            • 17717
            • 433 Posts
            Also, is it possible to have the styling for the text with the AjaxSearch results window only? Currently, it highlights the found words on the rest of the site too.

            Thanks
            Lee
              http://www.blend.uk.com | Web Design by Blend
              • 15987
              • 786 Posts
              Lee,
              if you want to remove the highlighting from the rest of the site just delete the search highlight plugin, that is what makes the other pages get highlighted.

              As for the search here text, the javascript is included to remove that text by defaault. do you have a link to inspect the behavior, maybe I can help you fix it if I can see it.