velvetpixel Posted December 14, 2011 Posted December 14, 2011 I want to pre-fill the general search field with: Find what you want today I would like the text to disappear when someone clicks in the search box to start typing. I know in a regular form I could use something like: value="Find what you want today" onFocus="this.value='';" onBlur="if(this.value=='') this.value='Find what you want today';" But the osCommerce form uses this: <?php echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get'); echo tep_draw_input_field('keywords', '', 'size="10" maxlength="64" style="width: 300px"') . ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description', '1'); ?> How can I customize just the general search field? osCommerce 2.3.1 Add-Ons Installed Header Tags SEO Ultimate SEO URLs Google Sitemap SEO Easy Populate QT Pro Margin Report AJAX Attribute Manager Smart Columns CKEditor OSCThumb Select Product Image Directory Category CSS Menu Enable Disable Categories Contact Form Captcha
♥kymation Posted December 14, 2011 Posted December 14, 2011 Change the input field line to this: echo tep_draw_input_field('keywords', '', 'size="10" maxlength="64" style="width: 300px" value="Find what you want today" onFocus="this.value=\'\';" onBlur="if(this.value==\'\') this.value=\'Find what you want today\';"') . ' ' . tep_hide_session_id() . tep_draw_hidden_field('search_in_description', '1'); Regards Jim See my profile for a list of my addons and ways to get support.
velvetpixel Posted December 14, 2011 Author Posted December 14, 2011 Awesome! Thanks Jim :) osCommerce 2.3.1 Add-Ons Installed Header Tags SEO Ultimate SEO URLs Google Sitemap SEO Easy Populate QT Pro Margin Report AJAX Attribute Manager Smart Columns CKEditor OSCThumb Select Product Image Directory Category CSS Menu Enable Disable Categories Contact Form Captcha
Recommended Posts
Archived
This topic is now archived and is closed to further replies.