Page 1 of 1

Adding text to the search text box

Posted: Mon Jul 06, 2009 6:20 am
by gio50000
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

Re: Adding text to the search text box

Posted: Mon Jul 06, 2009 6:29 am
by mazhar
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>

Re: Adding text to the search text box

Posted: Mon Jul 06, 2009 3:23 pm
by gio50000
@mazhar - perfect thanks!