I had this row:
echo "<td style='width:11%' id='client_quote_tr' name='client_quote_tr' onclick='changeColorTaskClientQuote(this);'>".$r['task']."</td>";
What’s the value of ‘this‘? I mean it gets the value of attribute name, or what else?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Debug it. Add a console.log line. Open up the console. Click on the td and see what appears.
You will see it passes a reference to the element you clicked on. Very handy.
jsFiddle Example