High!
sinnvoll wäre natürlich auch Code dazu. So kann man dir nur sagen, dass du kein Element mit dem Namen 'Lottoschein' in deinem Dokument hast, zumindest nicht zum Zeitpunkt des Aufrufs.
Hier ist der Code:
<html>
<head>
<style type="text/css">
td { text-align:center }
</style>
<script language="javascript" type="text/javascript">
Feld = new Array(49);
ch=0;
for (i=0; i<49; i++)
{
if (document.forms[0].elements['Lottozahl'][i].checked)
{
ch++;
}
}
alert(ch);
</script>
<title>LOTTO - 6 aus 49</title>
</head>
<body>
<form name="Lottoschein" action="Ziehung.php" method="post">
<table width="250">
<tr>
<td>1<br><input type="checkbox" name="Lottozahl"></input></td>
<td>2<br><input type="checkbox" name="Lottozahl"></input></td>
<td>3<br><input type="checkbox" name="Lottozahl"></input></td>
<td>4<br><input type="checkbox" name="Lottozahl"></input></td>
<td>5<br><input type="checkbox" name="Lottozahl"></input></td>
<td>6<br><input type="checkbox" name="Lottozahl"></input></td>
<td>7<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
<tr>
<td>8<br><input type="checkbox" name="Lottozahl"></input></td>
<td>9<br><input type="checkbox" name="Lottozahl"></input></td>
<td>10<br><input type="checkbox" name="Lottozahl"></input></td>
<td>11<br><input type="checkbox" name="Lottozahl"></input></td>
<td>12<br><input type="checkbox" name="Lottozahl"></input></td>
<td>13<br><input type="checkbox" name="Lottozahl"></input></td>
<td>14<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
<tr>
<td>15<br><input type="checkbox" name="Lottozahl"></input></td>
<td>16<br><input type="checkbox" name="Lottozahl"></input></td>
<td>17<br><input type="checkbox" name="Lottozahl"></input></td>
<td>18<br><input type="checkbox" name="Lottozahl"></input></td>
<td>19<br><input type="checkbox" name="Lottozahl"></input></td>
<td>20<br><input type="checkbox" name="Lottozahl"></input></td>
<td>21<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
<tr>
<td>22<br><input type="checkbox" name="Lottozahl"></input></td>
<td>23<br><input type="checkbox" name="Lottozahl"></input></td>
<td>24<br><input type="checkbox" name="Lottozahl"></input></td>
<td>25<br><input type="checkbox" name="Lottozahl"></input></td>
<td>26<br><input type="checkbox" name="Lottozahl"></input></td>
<td>27<br><input type="checkbox" name="Lottozahl"></input></td>
<td>28<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
<tr>
<td>29<br><input type="checkbox" name="Lottozahl"></input></td>
<td>30<br><input type="checkbox" name="Lottozahl"></input></td>
<td>31<br><input type="checkbox" name="Lottozahl"></input></td>
<td>32<br><input type="checkbox" name="Lottozahl"></input></td>
<td>33<br><input type="checkbox" name="Lottozahl"></input></td>
<td>34<br><input type="checkbox" name="Lottozahl"></input></td>
<td>35<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
<tr>
<td>36<br><input type="checkbox" name="Lottozahl"></input></td>
<td>37<br><input type="checkbox" name="Lottozahl"></input></td>
<td>38<br><input type="checkbox" name="Lottozahl"></input></td>
<td>39<br><input type="checkbox" name="Lottozahl"></input></td>
<td>40<br><input type="checkbox" name="Lottozahl"></input></td>
<td>41<br><input type="checkbox" name="Lottozahl"></input></td>
<td>42<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
<tr>
<td>43<br><input type="checkbox" name="Lottozahl"></input></td>
<td>44<br><input type="checkbox" name="Lottozahl"></input></td>
<td>45<br><input type="checkbox" name="Lottozahl"></input></td>
<td>46<br><input type="checkbox" name="Lottozahl"></input></td>
<td>47<br><input type="checkbox" name="Lottozahl"></input></td>
<td>48<br><input type="checkbox" name="Lottozahl"></input></td>
<td>49<br><input type="checkbox" name="Lottozahl"></input></td>
</tr>
</table>
<input type="submit" value="Ziehen!"></input>
</form>
</body>
</html>
...aber egal, was ich mache, ich bekomme immer nur "document.forms[0] has no properties"!
Bis bald im Khyberspace!
Yadgar