P.A. Franken 4.Jan.12 06:59 AM a Web browser Domino Designer 6.5.4 Windows XP
Hi,
I'm working on a form in which I want count the values of two or more fields as they are filled in (and show them).
I found a nifty little javascript on the Internet, which works great and does exactly what i want it to do:
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
function addme() {
var number1 = ( document.form.value1.value - 0 );
var number2 = ( document.form.value2.value - 0 );
var number3 = ( document.form.value3.value - 0 );
document.getElementById("sum").innerHTML = number1 + number2 + number3;
}
</script>
<form method="post" name="form">
Field 1: <input type="text" name="value1" onchange="addme()"><BR>
Field 2: <input type="text" name="value2" onchange="addme()"><BR>
Field 3: <input type="text" name="value3" onchange="addme()">
<div id="sum"> </div>
</form>
</body>
</html>
When I try to transport / use this script in Notes, it doesn't work. I get a Javascript Error : Is Null or Not an Object.
Do any of you know what I'm doing wrong? I'm a novice when it comes to Javascript.
Is there another solution, maybe a @Function?
Your help is greatly appreciated!
Peter Franken


Counting values of two or more fiel... (P.A. Franken 4.Jan.12)
. . RE: Counting values of two or more ... (Martha Geppert 4.Jan.12)
. . . . RE: Counting values of two or more ... (P.A. Franken 5.Jan.12)
. . . . . . RE: Counting values of two or more ... (Kenneth Haggman... 5.Jan.12)
. . . . . . . . RE: Counting values of two or more ... (P.A. Franken 5.Jan.12)
|