el mismo funciona pero pasa siempre todas las variables, como hago para pasar los inputs hidden solo cuando se selcciona el radio q
saludos
Código PHP:
<script type="text/javascript"><!--
function search_to(form){
if (form.search_in[0].checked){
form.action="http://www.software-p2p.com/google.html";
} else {
form.action="http://www.software-p2p.com/";
form.submit();
}
}
function changeto(type)
{
var inp=document.getElementById('s');
inp.name=type;
}
//--></script>
<form method="get" id="searchform" action="http://www.software-p2p.com/google.html" name="form_search" onSubmit="javascript:return search_to(form_search);">
<input type="hidden" name="cx" value="partner-pub-1196864352226496:69elgzrmqfq" />
<input type="hidden" name="cof" value="FORID:11" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="radio" name="search_in" checked="checked" onChange="changeto('q');" /><label>Google</label>
<input type="radio" name="search_in" onChange="changeto('s');" /><label>SoftwareP2P</label>
<input type="text" id="s" name="q" value="" />
<input type="submit" id="searchsubmit" name="sa" value="" onclick="javascript:submit();" />
</form>