View Full Version : Help me please with this code

05-01-2007, 11:30 PM

I need to change the drop-down box in this code with checkboxes and I dont know how. Please help me...
Replace the "option value="www.javascriptkit.com"" for a checkbox and so one...

Thank you in advance

<script type="text/javascript">

function Gsitesearch(curobj){
var domainroot=curobj.domainroot[curobj.domainroot.selectedIndex].value
curobj.q.value="site:"+domainroot+" "+curobj.qfront.value

<form action="http://www.google.com/search" method="get" onSubmit="Gsitesearch(this)">

<input name="q" type="hidden" />
<input name="qfront" type="text" style="width: 180px" /> <input type="submit" value="Search" /><br />
<select name="domainroot">
<option value="www.javascriptkit.com" selected="1">JavaScript Kit</option>
<option value="www.dynamicdrive.com">Dynamic Drive</option>
<option value="www.freewarejava.com">FreewareJava.com</option>



05-02-2007, 08:32 PM
If you change the dropdown to checkboxes, then the user can select multiple sites and it will mess up the Google site search. AFAIK, you can only put one site in a Google site search.

Philip M
05-02-2007, 09:21 PM
Radio buttons, perhaps?