Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Moving 'Search' to header - help with default value


Mooligan

Recommended Posts

Posted

As per an older thread Greg Williams posted how he moved his search into the header. I have it up in the header now, but am not entirely sure how to make the default value in the text box to be "Enter Keywords"

 

This is the code I have in includes/header.php

<input type="text" name="keywords"  size="18" maxlength="40" value="<?php echo htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["keywords"]));?>"></td> 

   <td> <?php echo tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH);?> </form></td> 

 

 

If I add in a value="Enter Keywords" it works, but it clears whatever the user had in the search box after each search and enters that back in. I want it to be there initially, but want whatever the user searches for to stay in the box after he presses search..

 

Help?

Archived

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

×
×
  • Create New...