|
Posted by Troy Piggins on 01/31/06 23:06
First off, I am not sure how acceptable/common it is to do this.
Secondly, I know little html - just enough to be dangerous :-/
I got a copy of google's free site search code so I can have google
search form on my personal home page (still under construction).
Then I thought of other reference type websites/search sites I use like
dictionary.reference.com, wikipedia, white pages and so on. I thought
it would be handy to have a text input box and search button like on the
basic google one, but have additional radio buttons below that
determined which facility to use.
eg - click on a "google" radio button (which would be the default) to
use the string in the input box as web search, have a "dictionary" radio
button to check spelling of the text in box and so on...
Not sure how to go about that next step. I added a radio button like
below, but I do not know enough about html/forms to get any further. I
think I need to somehow change the "action" in the form depending on the
radio button, but how to do that?
<form method=get action=http://www.google.com.au/search name="search_form">
<input type=text name=q size=20 maxlength=255 value="">
<input type=submit value="Search"><br>
<label for="g"><input type="radio" name="db" value="*" id="g" checked>
<a href="http://www.google.com.au">Google</a></label>
<label for="d"><input type="radio" name="db" value="*" id="d">
<a href="http://dictionary.reference.com">Dictionary</a></label>
</form>
Thanks for any help on the above.
--
Troy Piggins
Ubuntu 5.10 pkgs : kernel 2.6.12-9-386, postfix 2.2.4, procmail 3.22
Compiled from src : slrn 0.9.8.1/rt (score_color patch), mutt 1.5.11i
vim 6.4
Navigation:
[Reply to this message]
|