1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
|
< HTML>
<head>
<script type="text/javascript" language="javascript">
function focusTheNextOne(){
var iFirstOneValue = parseInt(document.getElementById('firstone').value);
if(iFirstOneValue != 0){
var iSecondOneValue = parseInt(document.getElementById('secondone').value);
if(iSecondOneValue != 0){
var iThirdOneValue = parseInt(document.getElementById('thirdone').value);
if(iThirdOneValue != 0){
// hier muss ich nichts mehr machen, da alle felder ausgefüllt sind
} else document.getElementById('thirddone').focus();
} else document.getElementById('secondone').focus();
} else document.getElementById('firstone').focus();
}
</script>
</head>
<body onLoad="javascript:focusTheNextOne();">
<form action="disesedatei.php" method="post">
<input type="text" name="firstinput" ID="firstone" value="<?php if(isset($_POST["firstinput"]) AND !empty($_POST["firstinput"])) echo $_POST["firstinput"]; else echo "0"; ?>">
<input type="text" name="secondinput" ID="secondone" value="<?php if(isset($_POST["secondinput"]) AND !empty($_POST["secondinput"])) echo $_POST["secondinput"]; else echo "0"; ?>">
<input type="text" name="thirdinput" ID="thirdone" value="<?php if(isset($_POST["thirdinput"]) AND !empty($_POST["thirdinput"])) echo $_POST["thirdinput"]; else echo "0"; ?>">
<input type="submit" value="Berechnen">
</form>
</body>
</ HTML>
|