simonking
08-03-2005, 11:38 AM
Hi,
Basically what I am after is a form that lets me type in search, choose a search type/engine (eg. Google World Wide, Google Australia, Google Image Search) from a drop down menu and search.
I have tried to do it with this code posted here, but as I have not had much experience with forms yet, I am not sure how to do them. I think maybe I might need to use more JavaScript (the script in there presently is from google search page).
Thank-you
<HTML>
<HEAD>
<TITLE> Search Construction Page </TITLE>
</HEAD>
<BODY>
<FORM action=http://www.google.com.au/search name=f onsubmit="rbi(this);">
<SCRIPT>
<!--function qs(el) {if (window.RegExp && window.encodeURIComponent) {var ue=el.href;var qe=encodeURIComponent(document.f.q.value);if(ue.indexOf("q=")!=-1){el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);}else{el.href=ue+"&q="+qe;}}return 1;}// -->
</SCRIPT>
<SELECT>
<OPTION id=all name=meta value=""> <LABEL for=all>Google World Wide</LABEL>
<OPTION id=cty name=meta value="cr=countryAU"> <LABEL for=cty>Google Australia </LABEL>
<OPTION id=cty name=meta value="cr=countryTH"> <LABEL for=cty>Google Thailand </LABEL>
</SELECT>
<INPUT maxLength=256 size=20 name=q value="">
<INPUT type=submit value="Search" name=btnG>
</BODY>
</HTML>
Basically what I am after is a form that lets me type in search, choose a search type/engine (eg. Google World Wide, Google Australia, Google Image Search) from a drop down menu and search.
I have tried to do it with this code posted here, but as I have not had much experience with forms yet, I am not sure how to do them. I think maybe I might need to use more JavaScript (the script in there presently is from google search page).
Thank-you
<HTML>
<HEAD>
<TITLE> Search Construction Page </TITLE>
</HEAD>
<BODY>
<FORM action=http://www.google.com.au/search name=f onsubmit="rbi(this);">
<SCRIPT>
<!--function qs(el) {if (window.RegExp && window.encodeURIComponent) {var ue=el.href;var qe=encodeURIComponent(document.f.q.value);if(ue.indexOf("q=")!=-1){el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);}else{el.href=ue+"&q="+qe;}}return 1;}// -->
</SCRIPT>
<SELECT>
<OPTION id=all name=meta value=""> <LABEL for=all>Google World Wide</LABEL>
<OPTION id=cty name=meta value="cr=countryAU"> <LABEL for=cty>Google Australia </LABEL>
<OPTION id=cty name=meta value="cr=countryTH"> <LABEL for=cty>Google Thailand </LABEL>
</SELECT>
<INPUT maxLength=256 size=20 name=q value="">
<INPUT type=submit value="Search" name=btnG>
</BODY>
</HTML>