Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2010
    Posts
    20
    Plugin Contributions
    0

    Default Linking search function to custom CSS search box

    We have a custom search box that we wish to implement in our header right in the middle next to our logo.

    The search box can be seen at www.seeinteriors.co.uk/related_sites.html

    How can we link the search function to this search box or alternatively how can we move the standard zen cart search box to the header so we can apply similar styling once it has been moved?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Linking search function to custom CSS search box

    Quote Originally Posted by seeinteriors View Post
    We have a custom search box that we wish to implement in our header right in the middle next to our logo.

    The search box can be seen at www.seeinteriors.co.uk/related_sites.html

    How can we link the search function to this search box or alternatively how can we move the standard zen cart search box to the header so we can apply similar styling once it has been moved?
    Try this ins your "related_sites.html" page...
    HTML Code:
    <form id="searchbox" action="http://seeinteriors.co.uk/index.php?main_page=advanced_search_result" method="get">
    <input type="hidden" name="main_page" value="advanced_search_result" />
    <input type="hidden" name="search_in_description" value="1" />
    <input id="search" type="text" name="keyword" size="6" maxlength="30" style="width: 138px" value="Search for..." onfocus="if (this.value == 'Search for...') this.value = '';" onblur="if (this.value == '') this.value = 'Search for...';" />    
    <input id="submit" type="submit" value="Search"></form>
    It should style accordingly as well as the ID's are still there. Thoudh you might want to remove: size="6" maxlength="30" style="width: 138px"
    20 years a Zencart User

  3. #3
    Join Date
    Dec 2010
    Posts
    20
    Plugin Contributions
    0

    Default Re: Linking search function to custom CSS search box

    Quote Originally Posted by schoolboy View Post
    Try this ins your "related_sites.html" page...
    HTML Code:
    <form id="searchbox" action="http://seeinteriors.co.uk/index.php?main_page=advanced_search_result" method="get">
    <input type="hidden" name="main_page" value="advanced_search_result" />
    <input type="hidden" name="search_in_description" value="1" />
    <input id="search" type="text" name="keyword" size="6" maxlength="30" style="width: 138px" value="Search for..." onfocus="if (this.value == 'Search for...') this.value = '';" onblur="if (this.value == '') this.value = 'Search for...';" />    
    <input id="submit" type="submit" value="Search"></form>
    It should style accordingly as well as the ID's are still there. Thoudh you might want to remove: size="6" maxlength="30" style="width: 138px"
    Thankyou! that works perfectly.

    One final question, any idea how to remove the yellow outline that appears when you click to type? Does not appear in IE but does in Google Chrome.

 

 

Similar Threads

  1. Moving the Header Search Box Function.
    By Mike_Dean in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 9 May 2008, 10:47 PM
  2. Custom Search Function
    By adventurer in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 Oct 2007, 07:17 AM
  3. embed an internal search engine or more functional search function
    By reza in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 30 May 2007, 04:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg