I have 2 pages that has a huge dynamic generated table on each. The tables are almost identical so instead of having the code in two places, I am making the table a user control that can be added to each page.
There is some client side script that changes row color or hides and shows text based on radio button clicks. The code works perfectly in the original aspx page but in the new page that has the user control in it I get Object Expected in this code on the if line.
var controlName = "AdditionalQuestionTable" + QuestionNumber + "_Yes";
if ($('#' + controlName).get(0) != null)
{
$('#' + controlName).get(0).className = 'visible';
}
I have ClientIDMode set to Static on both and I can see the ids are the same on both pages. I am stumped. When I do View Source and look at the rendered code for each they are identical as shown below.
<table id="AdditionalQuestionTable3_Yes" class="hidden" style="width:100%;">
<table id="AdditionalQuestionTable3_Yes" class="hidden" style="width:100%;">
Any help would be greatly appreciated. Thanks.
Rhonda
The Object Expected was caused by the jquery script file missing.