Archive for April, 2008
Clear the Box
People really overcomplicate the whole “click in the search box and have the text clear” feature of web sites. Here’s the method I always use for my WP-powered sites; easy, clean, lean:
<form id=”search_form” method=”post” action=”<?php echo $_SERVER['PHP_SELF']; ?>”>
<input type=”text” id=”s” value=”Search” onFocus=”if (value ==’Search’){value =”}” onblur=”if (value ==”){value=’Search’}” />
