Sunday, November 23, 2014
 
   
 
O-SE: Put the "Search" word in your search box   Minimize
Location: BlogsOpenDNN blogOpen-SearchEngine    
Posted by: Xepient Solutions 5/19/2009
Would you like for the word "Search" to appear inside your search box, and disappear when the user clicks on it?

If you would like the word search appears in the textbox and disappears when the user clicks on the box, read on, this is the way it was implemented by one of our customers:

This example shows how to do it for the skin object in this directory:  

 

dnnroot/DesktopModules\XSSearchInputSkinObject/XSSearchInputSkinObject.ascx

 

The same will work for the module version of the search box in this directory:

dnnroot/DesktopModules/XSSearchInput/XSSearchInput.ascx

Here is  the skin object modification: modify this textbox:

You should modify it to look like this:

value="Search" cssclass="NormalTextBox" onfocus="this.value='';" onBlur="if(this.value==''){this.value='Search'};">

 

Permalink |  Trackback

Comments (3)  
Re: Put the "Search" word in your search box    By dax on 9/17/2008
You should bold the value="Search" as well. I missed this when I tried to replicate.

Re: Put the "Search" word in your search box    By benchmark on 10/23/2008
I put the code in my skin file below.<br>xs:OPENSEARCH runat="server" id="xsOpenSearch" ShowGoImage="false"<br>ResultsTabName="Open-SearchEngine" ApplyCustomCSS="false"<br>But when I clicked on go button it does not go to search result.<br><br>If I add the modules(input & result ) in same page, it works fine. but if I put the input box in skin.ascx file, it does not redirect to search result page.<br><br>Please guide on this. I am looking for your positive reply

Re: Put the "Search" word in your search box    By host on 10/23/2008
For the skin object to display the search results you can do a couple of things with reference to the code you pasted below:<br><br>1. leave the ResultsTabName=""<br>This will load the search results in the same page where the user is at the moment of the search, removing all other modules<br><br>Or<br><br>2. create a page that contains the XSResults module, and add its name to the ResultsTabName="your_page_name"<br>

     
Search the Blog   Minimize
     
Blog List   Minimize
     
Blog Archive   Minimize