Results 1 to 7 of 7
  1. #1

    bug Search box header doesn't work in firefox? Help!

    Hi, I have put in a search box in the header bar, which works fine in IE but not in firefox!!

    My site: Rinato Office Furniture

    Code for tpl_search_header.php :

    Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_search_header.php 4142 2006-08-15 04:32:54Z drbyte $
     */
      $content = "";
      $content .= zen_draw_form('quick_find_header', zen_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');
      $content .= zen_draw_hidden_field('main_page',FILENAME_ADVANCED_SEARCH_RESULT);
      $content .= zen_draw_hidden_field('search_in_description', '1') . zen_hide_session_id();
    
      if (strtolower(IMAGE_USE_CSS_BUTTONS) == 'yes') {
        $content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"') . '&nbsp;' . zen_image_submit (BUTTON_IMAGE_SEARCH,HEADER_SEARCH_BUTTON);
      } else {
        $content .= zen_draw_input_field('keyword', '', 'size="6" maxlength="30" style="width: 100px" value="' . HEADER_SEARCH_DEFAULT_TEXT . '" onfocus="if (this.value == \'' . HEADER_SEARCH_DEFAULT_TEXT . '\') this.value = \'\';" onblur="if (this.value == \'\') this.value = \'' . HEADER_SEARCH_DEFAULT_TEXT . '\';"') . '&nbsp;<input type="submit" value="' . HEADER_SEARCH_BUTTON . '" style="width: 50px" />';
      }
    
      $content .= "</form>";
    ?>
    Code for search_header.php :

    Code:
    <?php
    /**
     * search_header ("sidebox") - this is a search field that appears in the navigation header
     * (it's not really a "sidebox" per se.
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: search_header.php 2834 2006-01-11 22:16:37Z birdbrain $
     */
    
      $search_header_status = $db->Execute("select layout_box_name from " . TABLE_LAYOUT_BOXES . " where (layout_box_status=1 or layout_box_status_single=1) and layout_template ='" . $template_dir . "' and layout_box_name='search_header.php'");
    
      if ($search_header_status->RecordCount() != 0) {
        $show_search_header= true;
      }
    
      if ($show_search_header == true) {
    
        require($template->get_template_dir('tpl_search_header.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_search_header.php');
    
        $title = '<label>' . BOX_HEADING_SEARCH . '</label>';
        $title_link = false;
        require($template->get_template_dir('tpl_box_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_box_header.php');
      }
    ?>
    Thanks

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Search box header doesn't work in firefox? Help!

    Try switching to the classic template to verify if this is a template issue

  3. #3

    Default Re: Search box header doesn't work in firefox? Help!

    It does indeed work with the classic template. I have checked the two search_header files and they are identical to the original files. So any ideas how I might be able to solve the problem?

    Thanks.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Search box header doesn't work in firefox? Help!

    It does indeed work with the classic template. I have checked the two search_header files and they are identical to the original files.
    If they are identical - - then you should not have the additional one

    Only files that are changed for a particular reason should be copied to your template as overriddden files...

    It must be caused by another file that only exists in your template structure

  5. #5

    Default Re: Search box header doesn't work in firefox? Help!

    Good shout there with the identical files.

    But with regards to the problem, is there anywhere I should start looking, anything I should particularly be looking for?

    What are your instincts?

  6. #6

    Default Re: Search box header doesn't work in firefox? Help!

    Ive just tested it in the sidebox and it works fine, so just doesn't work in the header...

  7. #7

    Default Re: Search box header doesn't work in firefox? Help!

    Finally I found the problem, which was in the stylesheet. The EZ pages were set to position: relative, which I guess was affecting the whole line, including the space for the search box.

    So I changed:

    #navEZPagesTop {
    font-weight: bold;
    margin: 0em;
    padding: 0.5em;
    position: relative;
    top: 110px;
    left: 190px;
    }

    to:

    #navEZPagesTop {
    font-weight: bold;
    margin: 0em;
    padding: 0.5em;
    position: absolute;
    top: 174px;
    left: 295px;
    }

    (I had to realign the EZ pages links after changed the position to absolute)

    Thanks for getting me started Kobra!

    Happy Days!

 

 

Similar Threads

  1. Header search box - please help
    By Sandy2012 in forum Basic Configuration
    Replies: 1
    Last Post: 7 Nov 2012, 11:07 AM
  2. v150 Search Box (Header) Help!!
    By Darion in forum General Questions
    Replies: 0
    Last Post: 8 Sep 2012, 06:50 PM
  3. Column Layout Grid for Product Listing doesn't work with Firefox?
    By pamcake in forum All Other Contributions/Addons
    Replies: 27
    Last Post: 23 Oct 2008, 07:00 PM
  4. Doesn't work in Firefox!!
    By jimmybob in forum General Questions
    Replies: 1
    Last Post: 29 Jul 2007, 10:22 PM
  5. Search Function Doesn't Work
    By squid in forum General Questions
    Replies: 0
    Last Post: 20 Jun 2007, 02:53 AM

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