Placing text inside the search field

General ShopSite user discussion

Placing text inside the search field

Postby ametron » Sun May 02, 2010 4:06 am

Is there a way to add text inside the search field, such as "Enter your
text here" and where the text would be cleared when clicked.
ametron
 
Posts: 27
Joined: Sun Apr 25, 2010 3:15 am
Location: California

Postby Jim » Mon May 03, 2010 8:48 am

Some of ShopSite's included search templates do this. Here is a line from the classy_se_template.sst search template that displays text in the box until the shopper clicks in the box.
<td class="search_input"><input class="search_input" name="search_field" type="text" size="10" value="[-- STORE.175 --]" onfocus="this.value=''"></td>


The [--STORE.175 --] reads the text value for "Search" set on Preferences > Store Text > Store pages. The onfocus="this.value=''" sets the field to blank when the cursor is placed in the input box.

You would need to modify your search template or page template to do something similar.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 176 guests