Home:ALL Converter>Javascript error in checkbox visibility

Javascript error in checkbox visibility

Ask Time:2010-07-09T19:28:48         Author:regy

Json Formatter

Hai,

I have a checkbox(chkVerified) control in a gridview. This is inside templatefield. I am checking the value of this checkbox in javascript. I am setting the visibility of this template field column through c# based on certain conditions. The issue is that, when the visibility of template field column is false, I am getting javascript error "Object Required" for the checkbox(chkVerified) control inside the template field I specified above. How can I avoid this error? I have to keep the javascript checking for checkbox(chkVerified) as it is needed in some other conditions. Help me.

Author:regy,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/3212151/javascript-error-in-checkbox-visibility
yy