Multiple Search Options - Radio Buttons Instead Of Drop Down List

AI Thread Summary
The discussion focuses on creating a search form that utilizes radio buttons instead of a drop-down list for selecting search engines. A tutorial is referenced, and a code snippet is provided that demonstrates how to implement this functionality. The code includes an input field for search terms and several radio buttons for different search engines, such as Google, Alta Vista, Dogpile, and Yahoo. When a user selects a radio button, the corresponding search engine URL is set, allowing the search to be executed when the button is clicked. This approach enhances user experience by providing a clear selection method for search options.
jleung
Messages
3
Reaction score
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.
 
Technology news on Phys.org
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]  />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:
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top