Zen Cart Logo
Forums / General Questions / Delete default search text in search box when clicked

Delete default search text in search box when clicked

Views: 5,388

Results 1 to 8 of 8
4 May 2008, 3:24 AM
#1
jaylyns avatar

jaylyns

New Zenner

Join Date:
Feb 2008
Posts:
61
Plugin Contributions:
0

Delete default search text in search box when clicked

I have edited what the default text was in the search box with the help of a very helpful zen forum user. However, I have just noticed then when I click in the search box it I have manually delete the text before typing in what I want to search for. Is there a way to make it where if a user clicks in the search box it clears it and they can just type what they are looking for. Thanks for any help.

My site is https://www.jaylyns.com Just a note: this site contains adult material.

4 May 2008, 4:11 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,603
Plugin Contributions:
0

Re: Delete default search text in search box when clicked

What did you do to change the default text? The behavior in a stock install is to disappear when clicked.

BTW- the default text could have been changed by editing the language file.

4 May 2008, 4:41 PM
#3
jaylyns avatar

jaylyns

New Zenner

Join Date:
Feb 2008
Posts:
61
Plugin Contributions:
0

Re: Delete default search text in search box when clicked

That's how I changed it. In the language file i just changed it within the quotes from search to what I wanted it to say. Don't believe I changed anything else to where it should have done that.

4 May 2008, 4:54 PM
#4
marg avatar

marg

Totally Zenned

Join Date:
Mar 2004
Posts:
642
Plugin Contributions:
0

Re: Delete default search text in search box when clicked

Yep.. for poops and piddles I tried using an apostrophe in there on one of my sites and my site behaves the same. The existing type stays. It doesn't like the apostophe! Now - How to fix that? Wish I could help.
Marg

5 May 2008, 3:46 AM
#5
jaylyns avatar

jaylyns

New Zenner

Join Date:
Feb 2008
Posts:
61
Plugin Contributions:
0

Re: Delete default search text in search box when clicked

Everywhere else I have used an apostrophe I proceeded it by / and it works fine. Thought it would do the same here in the search box. Worse case I'll take the apostrophe out. But if someone else knows another fix to this please let me know. Thanks.

21 Nov 2008, 5:33 PM
#6
coolman avatar

coolman

New Zenner

Join Date:
Jun 2008
Posts:
35
Plugin Contributions:
0

Re: Delete default search text in search box when clicked

How did you change the text in the search box? I need to do the same thing, and I could not find your original posts for this.

Thank you

15 Apr 2011, 2:33 AM
#7
zzinker avatar

zzinker

New Zenner

Join Date:
Jan 2011
Posts:
7
Plugin Contributions:
0

Re: Delete default search text in search box when clicked

/includes/languages/english/header.php

15 Apr 2011, 5:03 AM
#8
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,770
Plugin Contributions:
9

Re: Delete default search text in search box when clicked

Editing /includes/languages/english/header.php should be saved to any custom template folder (/includes/languages/english/CUSTOM/header.php where CUSTOM is your template.
Using classic or template default will only create problems at upgrade time.