Ciao ragazzi,ho trovato questo codice su questo forum.Chi mi da una mano a modificarlo?
Vorrei che le quote siano direttamente cliccabili...mi spiego:vorrei che si potesse cliccare direttamente sulla quota e non la checkbox,solo perchè è brutta esteticamente.
Chi mi fa questo favore dato che non sono molto esperto?Grazie
Ecco il codice
codice:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>bet</title>
<style type="text/css">
body {
background-color: #333;
}
</style>
</head>
<body>
<script type="text/javascript">
var rows = 7
var bet
function selectChoose(row,column) {
for (ii=1;ii<=3;ii++) {
if (ii != column) {
eval('document.form_bet.choose' + row + '_' + ii + '.checked = false');
}
}
elab();
}
function elab() {
bet = 1
for (ii2=1;ii2<=rows;ii2++) {
for (ii3=1;ii3<=3;ii3++) {
eval('selected = document.form_bet.choose' + ii2 + '_' + ii3 + '.checked');
if (selected) {
//alert('coordinate selezionato:' + ii + ',' + ii2);
eval('bet = bet * document.form_bet.choose' + ii2 + '_' + ii3 + '.value');
}
}
}
document.form_bet.rate.value = bet;
document.form_bet.win.value = document.form_bet.bet.value * bet;
}
</script>
<form name="form_bet" action="altrapagina.php" method="post" style="margin:0; font-family: Verdana, Geneva, sans-serif; font-size: 11px; color: #111;">
<div align="center">
<center>
<table bordercolor="#333" border="1">
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td width="225" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
Manchester United - Borussia Dortumund</font></td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center" onmouseover="this.style.background ='#89a5fa'" onmouseout="this.style.background ='#181818'">
<input name="choose1_1" type="checkbox" value="2.50" onclick="selectChoose(1,1);"/>
<font color="#FFFFFF">32.50</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose1_2" type="checkbox" value="3.25" onclick="selectChoose(1,2);" />
33.25</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose1_3" type="checkbox" value="7.50" onclick="selectChoose(1,3);" />
37.50</font>
</td></tr>
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
Milan - Juventus</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose2_1" type="checkbox" value="1.25" onclick="selectChoose(2,1);" />1.25</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose2_2" type="checkbox" value="3.35" onclick="selectChoose(2,2);" />3.35</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose2_3" type="checkbox" value="2.50" onclick="selectChoose(2,3);" />2.50</font></p>
</td></tr>
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td height="30" bgcolor="#222222" style="text-align: center"><font color="#FFFFFF">Chelsea - Liverpool</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose3_1" type="checkbox" value="4.25" onclick="selectChoose(3,1);" />4.25</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose3_2" type="checkbox" value="3.50" onclick="selectChoose(3,2);" />3.50</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose3_3" type="checkbox" value="1.00" onclick="selectChoose(3,3);" />1.00</font>
</td></tr>
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td height="30" bgcolor="#222222" style="text-align: center"><font color="#FFFFFF">Inter - Barcellona</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose4_1" type="checkbox" value="4.25" onclick="selectChoose(4,1);" />4.25</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose4_2" type="checkbox" value="3.50" onclick="selectChoose(4,2);" />3.50</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose4_3" type="checkbox" value="1.00" onclick="selectChoose(4,3);" />1.00</font>
</td></tr>
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td height="30" bgcolor="#222222" style="text-align: center"><font color="#FFFFFF">Arsenal - Lione</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose5_1" type="checkbox" value="4.25" onclick="selectChoose(5,1);" />4.25</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose5_2" type="checkbox" value="3.50" onclick="selectChoose(5,2);" />3.50</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose5_3" type="checkbox" value="1.00" onclick="selectChoose(5,3);" />1.00</font>
</td></tr>
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td height="30" bgcolor="#222222" style="text-align: center"><font color="#FFFFFF">Real Madrid - Bayern Monaco</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose6_1" type="checkbox" value="4.25" onclick="selectChoose(6,1);" />4.25</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose6_2" type="checkbox" value="3.50" onclick="selectChoose(6,2);" />3.50</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose6_3" type="checkbox" value="1.00" onclick="selectChoose(6,3);" />1.00</font>
</td></tr>
<tr>
<td width="35" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
20:45</font>
</td>
<td height="30" bgcolor="#222222" style="text-align: center"><font color="#FFFFFF">Stoccarda - Dinamo Kiev</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose7_1" type="checkbox" value="4.25" onclick="selectChoose(7,1);" />4.25</font>
</td>
<td width="30" height="30" bgcolor="#222222" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose7_2" type="checkbox" value="3.50" onclick="selectChoose(7,2);" />3.50</font>
</td>
<td width="30" height="30" bgcolor="#111111" style="text-align: center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
<input name="choose7_3" type="checkbox" value="1.00" onclick="selectChoose(7,3);" />1.00</font>
</td></tr>
</table>
</center>
</div>
<p align="center">
<font face="Verdana" fontsize=11px color="#FFFFFF">
puntata <input name="bet" type="text" value="10" onkeyup="elab();" size="13" /> €
scommessa <input name="rate" type="text" value="1" onkeyup="elab();" size="16" /> €
<font color="#CC0000">
vincita</font> <input name="win" type="text" value="10" onkeyup="elab();" size="20" />
€
<input name="" type="submit" value="invia scelte" />
</font>
</form>
</body>
</html>