Click here to Skip to main content
15,847,903 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I used the below java script to calculate gridview textboxes,
but I am getting an error of "Object required".
The code is like this:

function totalMark()
  var total=$get('txtSub1').value+$get('txtSub2').value+...;
  var percentage=total/(totalmarks)*100;
Updated 20-Dec-10 2:16am
JF2015 20-Dec-10 7:00am    
Edited to fix spelling errors.
Sandeep Mewara 20-Dec-10 8:27am    
This is because you just COPY-PASTED the stuff that was shared with you this morning.

As said, dont expect the full code. Try, make some effort from your side.

Let me tell you where the error would be: "Object required"
This line; var percentage=total/(totalmarks)*100;

This is because 'totalmarks' is not defined.

Now, just make the change and you should be good to go.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900