Announcement

Collapse
No announcement yet.

Replace "search by keyword" when typing in text

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace "search by keyword" when typing in text

    The search box displays "search by keyword". But, when you enter the keyword, you have to delete the "search by Keyword" phrase or else your keyword is mixed into the Search by Keyword prompt. It should disappear when you start typing.

    It should work like the 3DCart search feature on the knowledge base:
    http://support.3dcart.com/index.php?_m=knowledgebase

    On the 3dCart page, the text "enter Search Query" disappears when you start to type. How do you make it work like that on a 3dcart store?
    kem
    AddressNumbers.com
    Address Plaques, Memorials, Home & Garden Decor, Gifts and more.

  • #2
    I just googled this exact same issue and found this two year old post.

    This is a really annoying feature, when you click in the search box and start typing, but it doesn't remove the "search by keyword" text.

    Any solution?

    Comment


    • #3
      This is simple enough to do with javascript. Google for "clear search box on entry" or something similar.

      Comment


      • #4
        Are you using a free, custom, or premium template from 3dcart?
        TheCartDesigner.com
        Not 3dcart Owned or Operated
        100% Independent 3dcart Expert


        Follow Us on Twitter

        Comment


        • #5
          Fixed it. I think it's pretty stupid we have to search google on how to edit the search box and make it function properly.

          To anybody else wanting help, you have to enter this code into it
          Code:
          onclick="this.value=''"

          Comment


          • #6
            Interesting, but my template removed the "search by keyword" text the moment I clicked on the field.

            Here's the code that controls the input field...
            <input type="text" size="25" name="keyword" id="searchlight" class="search-text" onFocus="javascript:if (document.searchForm.keyword.value=='search by keyword') {document.searchForm.keyword.value='';};" onblur="if(this.value.length == 0) this.value = 'search by keyword'" value="search by keyword">
            Joanne Barker
            VS Web Design
            [email protected]

            Comment


            • #7
              That is why I asked if its a premium template or custom. Unfortunately some of the premium templates through 3dcart tend to have some bugs. And if its custom, sometimes you never know what you might get.

              You should use the input type as specified by vswebdesign as it is the standard that should have been in place already. Just be sure to change the class to what your current search bar is using if you copy and paste the input code.
              TheCartDesigner.com
              Not 3dcart Owned or Operated
              100% Independent 3dcart Expert


              Follow Us on Twitter

              Comment

              Working...
              X