I have the following Javascript code, however it is not working. Can anyone help me out with this?
These are the things that I want to achieve:
- increase the number of games to those requested by the user p1
- check if only valid numbers have been entered p2
- line break between the first 10 and the second 10 p3
Any assistance?
<html>
<head>
<title>processing</title>
</head>
<body>
<form name="processing" action="processing.php" method="POST">
<input type="hidden" name="check_submit" value="1" />
<p>Please select the numbers of players:</p>
<select>
<SCRIPT Language="JavaScript">
for (i = 1; i <= 8; i++) {
document.write('<option value="' + i + '">' + i + '</option>');
}
</script>
</select>
<input type="submit" />Scores From Game 1:
<SCRIPT Language="JavaScript">
for (i = 0; i < 20; i++) {
document.write('<input type="number" name="scores[]" min="0" max="10" value="0"/>')
}
</script>
<input type="submit" />
</form>
</body>
</html>