Forum Moderators: open

Message Too Old, No Replies

drop down menu for multipul search

         

GeXus

6:32 pm on May 26, 2004 (gmt 0)

10+ Year Member



Does anyone know how I make a drop down box work?.. for example.. I have a search field, then a drop down box with two options A. Google and B. Yahoo and a submit button.
How do i have it function properly?

Thanks

birdbrain

7:52 pm on May 26, 2004 (gmt 0)



Hi there GeXus,

Do you mean like this...


[3]<script type="text/javascript">
//<![CDATA[
//]]>
function sendTo() {
if(document.forms[0][0].options[document.forms[0][0].selectedIndex].value=="") {
return;
}
else {
location.href=document.forms[0][0].options[document.forms[0][0].selectedIndex].value;
}
}
//]]>
</script>
<form action="">
<select>
<option value="">selections</option>
<option value="http://www.google.com/">google</option>
<option value="http://www.yahoo.com/">yahoo</option>
</select>
<input type="button" value="submit" onclick="sendTo(); return false"/>
</form>[/3]

birdbrain

GeXus

9:37 pm on May 26, 2004 (gmt 0)

10+ Year Member



No, I meen like if i have a search box.. and then a drop down menu for what engine will back the search term..