Click here to Skip to main content
14,640,723 members
Rate this:
Please Sign up or sign in to vote.
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 1: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.
Rate this:
Please Sign up or sign in to vote.

Solution 2

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.

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100