how to apply function calculate() to all the rows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Abul
    New Member
    • Oct 2015
    • 1

    #1

    how to apply function calculate() to all the rows

    Code:
    <script>function calculate() {
    		
    		var myBox1 = document.getElementById('box1').value;
    		var myBox2 = document.getElementById('box2').value;
    		var result = document.getElementById('result');	
    		var myResult = myBox1 * myBox2;
    		result.value = myResult;
    		
          }
    	</script>
    Last edited by Rabbit; Oct 22 '15, 05:33 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    not sure what you mean here … calculate() computes the product of exactly two form elements. it does not matter where you trigger that function from.

    Comment

    • madankarmukta
      Contributor
      • Apr 2008
      • 308

      #3
      Can you please put the complete html here, which will be more helpful.

      Which Row collection control you are using, as the events may vary?

      Comment

      Working...