I have a dropdownlist which is declared as follows:
<select onchange="reloadValues(this,event);">
... options here
</select>
When the user change the selection reloadValues is invoked and everything works perfectly. Now, I want to add the reloadValues when the user adds a new row which contains the dropdownlist so I did the following:
reloadValues(rowToBeAdded.find("select")[0]);
The reloadValues function is shown below:
function reloadValues(obj, event) {
{
var ele = obj.parentElement.parentElement;
var select2 = ele.cells[2].childNodes[1]; // ele.cells is empty when invoking // the reloadValues on demand through another method.
}
Any ideas!
obj.parentElement.parentElement is a TR element