Hello!
I m new here and also not a programmer. But i try to write a little JS for a website..
This little script should be able to divide something. For this i wrote the following:
<script type="text/javascript language="JavaScript">
function compute() {
var divid = document.forms.divide.divident.value;
var operator = document.forms.operator.value;
document.forms.divide.quotient.value = divid / operator;
}
</script>
<form name=divide action="javascript:compute();">
<input type=text name=divident size=5 maxlength=5>
<select name="operator">
<option value="10">10 % </option>
<option value="15">15 % </option>
<option value="20">20 % </option>
</select>
<input type=text name=quotient size=6 maxlength=6>
<input type=submit value="Berechnen">
<input type=reset value=Reset>
</form>
... but it doesnt work. Whats wrong? Please help me to solve this.
Best regards
Chris