Multiple Search Options - Radio Buttons Instead Of Drop Down List

  • Thread starter jleung
  • Start date
  • #1
3
0
The tutorial on how to make a search form with multiple search options was excellent!

http://www.mediacollege.com/internet/javascript/form/multi-search.html

However, is it possible to use radio buttons instead of a drop-down list?Can someone be kind enough to show me the code for it?

Million thanks.
 

Answers and Replies

  • #2
-Job-
Science Advisor
1,146
2
You can do for example:
Code:
<html>
<body>
    <script language="JavaScript">eng = 'http://www.google.com/search?q=';</script>  
    For: 
    <input type="text" id="searchterms">
    <input type="button" value="Search" onload="" onclick="window.location = eng + escape(document.getElementById('searchterms').value); return false;">
    <br />Search: 
    <input type="radio" onclick="eng = this.value;" checked name="sengines" value="http://www.google.com/search?q=" />Google
    <input type="radio" onclick="eng = this.value;" name="sengines" value="http://www.altavista.com/web/results?q=" />Alta Vista
    <input type="radio" onclick="eng = this.value;" name="sengines" value="[PLAIN]http://www.dogpile.com/info.dogpl/search/web/"[/PLAIN] [Broken] />Dogpile
    <input type="radio" onclick="eng = this.value;" name="sengines" value="http://search.yahoo.com/search?p=" />Yahoo!    
</body>
</html>
 
Last edited by a moderator:

Related Threads on Multiple Search Options - Radio Buttons Instead Of Drop Down List

  • Last Post
Replies
1
Views
6K
  • Last Post
Replies
3
Views
4K
  • Last Post
Replies
8
Views
2K
Replies
9
Views
2K
Replies
4
Views
663
Replies
2
Views
1K
  • Last Post
Replies
15
Views
773
  • Last Post
Replies
4
Views
2K
Replies
8
Views
680
Top