I want to fetch the values of field " value3 " which would get values dynamically and show sum of it as output in output id "hello" field.
Also i want to send field "value2" values to another page
thanks in advance
<html>
<head>
<title>Arithmetic operations</title>
</head>
<script type="text/javascript">
var x,y,z;
function Multiplication(o1, o2, o3){
x=o1.value;
y=o2.value;
z=x*y;
o3.value=z
}
function calcForm(formNode){
Multiplication(formNode.value1, formNode.value2, formNode.value3);
}
</script>
</head>
<body>
<div style="display:none">
<form name="calc">
<h1>Online Calculator</h1>
Enter first Numeric Value :
<input
id="value1"
type = "text"
onchange = "calcForm(this.parentNode)"
onkeypress = "this.onchange();"
onpaste = "this.onchange();"
oninput = "this.onchange();"
onloadstart ="this.onchange();"
value = "5"
/>
</br>
Enter Second Numeric Value :
<input
id="value2"
type = "text"
onchange = "calcForm(this.parentNode)"
onloadstart= "this.onchange();"
onkeypress = "this.onchange();"
onpaste = "this.onchange();"
oninput = "this.onchange();"
value = "1"
/>
</br>
</br>
Result of the Arithmetic operation is : <output type="number" id="value3"> </output></br>
</form>
</div>
<div id="i_container">
</div>
<form name="out" >
Estimated total: <output type="number" id="hello"></output>
<br><input type="submit">
</form>
<script>
count = 2;
my_parent = document.getElementById('i_container');
for(i=0; i<count; i++){
nw = calc.cloneNode(true);
nw.name = "dynamic_name_"+i;
nw.id = "dynamic_id_"+i;
my_parent.appendChild(nw);
}
for(i=0; i<count; i++){
p = document.getElementById("dynamic_id_"+i);
calcForm(p);
}
</script>
</body>
</html>