Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Adding "search" text in search box

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-27-2010, 04:15 AM
 
BBM_ BBM_ is offline
 

X-Adept
  
Join Date: May 2010
Location: Australia
Posts: 595
 

Default Adding "search" text in search box

Hi All,

This is probably a simple question but I am unsure on how to format the text box so it has the term "search" in it and when you click to search the text disappears.

Any suggestions?

Thanks in advance.
__________________
Multiple instances of X-cart
Reply With Quote
  #2  
Old 09-27-2010, 05:46 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Adding "search" text in search box

skin1/customer/search.tpl

In the input field code, change...
Code:
value="{$search_prefilled.substring|escape}"

To...
Code:
value="{$lng.lbl_search}" onblur="if(this.value=='') this.value='{$lng.lbl_search}';" onfocus="if(this.value=='{$lng.lbl_search}') this.value='';"
__________________
xcartmods.co.uk
Reply With Quote

The following user thanks PhilJ for this useful post:
BBM_ (09-27-2010)
  #3  
Old 09-27-2010, 06:48 AM
 
BBM_ BBM_ is offline
 

X-Adept
  
Join Date: May 2010
Location: Australia
Posts: 595
 

Default Re: Adding "search" text in search box

Phil I really appreciate the help it worked perfectly.

A big thank you.
__________________
Multiple instances of X-cart
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:14 PM.

   

 
X-Cart forums © 2001-2020