chelvis
12-06-2006, 06:06 PM
I have a form with a text box and image. I want to search my website if a usre enters a keyword into the text box and clicks the go button. I am using the Google engine for the search. But its not working. Here is the code:
Also what I should put in the form action?
Some one gave me the url for the location.href and asked me to insert the "searchValue".
<script language = "Javascript">
function GoogleSearch(searchValue)
{
location.href="http://search.mypage.com/search?q=" + searchValue + "&sort=date&output=xml_no_dtd&ie=UTF-8&oe=UTF-8&client=savin_template&proxystyle....";
}
</script>
in the above I didnt put the whole url. Its too long so I finished with...
Here is the Form code:
<form action=" " method="get" name="frmGoogle" onSubmit="GoogleSearch(this)">
<td align="right" valign="middle"><input type="text" name="search_field" size=20 class="search_field" /></td>
<td align="right"> <input type="image" src="/images/go_.gif" id="gobutton" /></td>
</form>
Also what I should put in the form action?
Some one gave me the url for the location.href and asked me to insert the "searchValue".
<script language = "Javascript">
function GoogleSearch(searchValue)
{
location.href="http://search.mypage.com/search?q=" + searchValue + "&sort=date&output=xml_no_dtd&ie=UTF-8&oe=UTF-8&client=savin_template&proxystyle....";
}
</script>
in the above I didnt put the whole url. Its too long so I finished with...
Here is the Form code:
<form action=" " method="get" name="frmGoogle" onSubmit="GoogleSearch(this)">
<td align="right" valign="middle"><input type="text" name="search_field" size=20 class="search_field" /></td>
<td align="right"> <input type="image" src="/images/go_.gif" id="gobutton" /></td>
</form>