Adding text to the search text box

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
gio50000
Commander (CMDR)
Commander (CMDR)
Posts: 123
Joined: Mon Feb 18, 2008 12:51 pm
Location: Orlando, FL
Contact:

Adding text to the search text box

Post by gio50000 » Mon Jul 06, 2009 6:20 am

I want to add 'search our website' label inside the search input field. When the user clicks to enter a search keyword the text disappears no backspace or delete of the text required. Any thoughts?

GIo
Thank you,
Gio

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Adding text to the search text box

Post by mazhar » Mon Jul 06, 2009 6:29 am

One simple attempt could be to edit ConLib/SimpleSearch.ascx file and update following code

Code: Select all

<asp:TextBox ID="SearchPhrase" runat="server" CssClass="searchPhrase" MaxLength="60"></asp:TextBox>
to

Code: Select all

<asp:TextBox ID="SearchPhrase" Text="Search our web..." onfocus="this.value='';" runat="server" CssClass="searchPhrase" MaxLength="60"></asp:TextBox>

User avatar
gio50000
Commander (CMDR)
Commander (CMDR)
Posts: 123
Joined: Mon Feb 18, 2008 12:51 pm
Location: Orlando, FL
Contact:

Re: Adding text to the search text box

Post by gio50000 » Mon Jul 06, 2009 3:23 pm

@mazhar - perfect thanks!
Thank you,
Gio

Post Reply