Originariamente inviato da vic53
Ti ho corretto il tuo codice
e l'ho provato....
ciao
vic53
----------
<html>
<head>
<title>Sans Titre</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="HAPedit 3.1">
<script type="text/javascript">
function variante(a){
var sName = [];
sName[0]= "http://www.google.it/search?q=" + document.test.query.value;
sName[1]= "http://images.google.it/search?tbm=isch&hl=it&source=hp&biw=1920&bih=859&q =" + document.test.query.value;
for (i=0; i<2; i++) {
if (a==i) {
if (document.test.checkgroup[0].checked)
document.location.href=sName[i];
else
window.open(sName[i]);
}
}
}
</script>
</head>
<body bgcolor="#FFFFFF">
<hr />
<form action="" method="post" name="test" id="Test">
<input type="text" name="query" value=""/>
<input type="button" value="cerca" onclick="variante(0);"/>
<input type="button" value="cerca con googleimmagini" onclick="variante(1);"/>
<input type="radio" name="checkgroup" value="0" checked="checked" />
<input type="radio" name="checkgroup" value="1" />
</form>
</body>
</html>