By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

how to apply function calculate() to all the rows

P: 1
Expand|Select|Wrap|Line Numbers
  1. <script>function calculate() {
  2.  
  3.         var myBox1 = document.getElementById('box1').value;
  4.         var myBox2 = document.getElementById('box2').value;
  5.         var result = document.getElementById('result');    
  6.         var myResult = myBox1 * myBox2;
  7.         result.value = myResult;
  8.  
  9.       }
  10.     </script>
Oct 22 '15 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
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.
Oct 22 '15 #2

100+
P: 293
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?
Oct 25 '15 #3

Post your reply

Sign in to post your reply or Sign up for a free account.