Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I put an "enter" in to the search box?


bigbob2

Recommended Posts

Posted

Hi all, I am getting a lot of people on my site type something in to the search box then rather than press enter or click on the magnifying glass, they click on "Advanced Search" which just brings up another page rather than searching.

 

So... what I want to do is replace the magnifying glass image with an image of a standard search button. My problem is that I cannot figure out how to put an enter between the search box field and the magnifying glass, so that the magnifying glass is centered under the search box field. Below is the cose I currently have for the search infobox (I presume that this is where I want to change it).

 

Thanks in advance

 

 

 

 

 

<?php

/*

$Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License

*/

?>

<!-- search //-->

<tr>

<td>

<?php

$info_box_contents = array();

$info_box_contents[] = array('text' => BOX_HEADING_SEARCH);

new infoBoxHeading($info_box_contents, false, false);

$info_box_contents = array();

$info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),

'align' => 'center',

'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>');

new infoBox($info_box_contents);

?>

</td>

</tr>

<!-- search_eof //-->

Posted

<?php
/*
$Id: search.php,v 1.22 2003/02/10 22:31:05 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
?>
<!-- search //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_SEARCH);
new infoBoxHeading($info_box_contents, false, false);
$info_box_contents = array();
$info_box_contents[] = array('form' => tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'),
'align' => 'center',
'text' => tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . '<br>' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>');
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- search_eof //-->

 

Try that

Posted

You my friend, are my favourite person for the week!

 

Thank you so much for your help.

 

Best regards,

Kev

:lol: :lol: :lol: :lol:

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...