I have a little problem I am having issues resolving. We have a search engine on our website. The search is on every page of our website. This search uses a form and passes the form data to a .asp page for processing. We have now introduced a new search feature on the site that uses completely different code
<FORM name="formSear" action="/search/index.asp"
<INPUT name="Send" type="submit" value="search" class="search_button">
<INPUT name="searWords" type="text" value="" alt="enter search text here">
The new search form is as follows:
<form accept-charset="UTF-8" action="http://search.usa.gov/search
" id="search_form" method="get">
<input name="commit" type="submit" value="Search" class="search_button"/>
<input autocomplete="off" class="usagov-search-autoc
omplete" id="query" name="query" type="text" />
So basically what I want to do and not do.
I do not want to go to EVERY page of my site and change the form
Find a way to take the "searWords" form item and pass it to the new form and automatically submit that form.
My guess is:
I can grab the form value for "searWords" and create a variable.
I can input that new variable into the new form under the "query" form item
The above is easy but I do not understand how I can automatically submit that new form to where it is seamless to the user. The old forms action is "/search/index.asp" so this is where I will place the code but again, I do not know how to automatically submit the new form.
Thank you for your time.