Prepend a word in an HTML <input> field upon Submit
Posted on 2004-09-07
On a site I'm working on, we use Atomz' free search. If you're not familiar with Atomz, they supply the code for your site's search form, which you paste into your HTML. Each field has an atomz-specific code in addition to regular HTML, when the form is submitted it gets sent to atomz' server, and the code is matched to your site's index there.
And that's why I'm posting this here...
<input size=35 name="sp-q">
<!-- The "Search" button -->
<input type=submit value="Search">
So the name for the search term field is "sp-q".
What I want to do is, whatever the person enters in the Search field, to be preceded by the word "Archives" when they click the Submit button.
So if they enter "product info" the actual search term that Atomz gets is "Archives product info", like that.