Forum Moderators: open

Message Too Old, No Replies

Search Box with Radio Toggle

search radio toggle buttons

         

urbanmac

2:19 pm on Jan 9, 2007 (gmt 0)

10+ Year Member



Hi

I want to create a search form that has two radio buttons and depending upon which one is selected searches a particular site, I'm not at all sure how I go about this though.

Thanks

alfaguru

5:55 pm on Jan 9, 2007 (gmt 0)

10+ Year Member



Hi, when you say "searches a particular site", what's actually going to do the searching? Google? Something else? The answer to your question will very much depend on that.

If it's Google, you can simply hack the standard Google search box, like this:


<!-- SiteSearch Google -->
<FORM method=GET action="http://www.google.com/search">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE bgcolor="#FFFFFF"><tr><td>
<A HREF="http://www.google.com/">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif"
border="0" ALT="Google"></A>
</td>
<td>
<INPUT TYPE=text name=q size=31 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Google Search">
<font size=-1>
<br><input type=radio name=sitesearch value=""> WWW
<input type=radio name=sitesearch value="example1.com" checked> example1.com <br>
<input type=radio name=sitesearch value="example2.com"> example2.com <br>
</font>
</td></tr></TABLE>
</FORM>
<!-- SiteSearch Google -->

urbanmac

8:36 pm on Jan 9, 2007 (gmt 0)

10+ Year Member



Its actually going to be used to search two databases, one is via lasso and the other is via a php driven CMS.