The only changes are the addition of the id attribute to the text box, and the javascript within the onclick attribute of the submit button. Don't forget to copy both changes through to your new search form in your advancedsearch.php if you want to do the same thing there...
Hello Gabriel,
This is best done with JavaScript on your search form. Try the following code to replace html/searchform.php:
<div class='searchform'>
<form name='search' action='<?php print $config_baseHREF ?>search.php'>
<input type='text' id='q' name='q' size='35' value='<?php print (isset($q)?$q:""); ?>' />
<input type='submit' onclick='if (!document.search.q.value) {alert("Please enter a search term");return false;}' value='<?php print translate("Search"); ?>' />
</form>
</div>
The only changes are the addition of the id attribute to the text box, and the javascript within the onclick attribute of the submit button. Don't forget to copy both changes through to your new search form in your advancedsearch.php if you want to do the same thing there...
Cheers,
David.