We recently switched over from Cognos 10 to Cognos 11.1.7, this code works fine in Cognos 10 and as we moved to Cognos 11 it broke some of the functionality. I was able to narrow down to this piece of code and I can't seem to figure out what is wrong with it. I added some alerts to do some checks and it is not able generate any value for 'mmid' field and it is coming up undefined after it goes through the loop.
function isChecked ()
{
// get the handle for the checkbox prompt - add div around them to distinguish
var prompt1 = document.getElementById('checkBox1');
var sel_list='';
var node_list = prompt1.getElementsByTagName('input');
var mmid_list = prompt1.getElementsByTagName('mmid'); //---- '[0].firstChild.data;'
for (var i = 0; i < node_list.length; i++)
{
var node = node_list[i];
var mm_item=mmid_list[i];
if (node.getAttribute('type') == 'checkbox') {
if (node.checked) {
// do something if checked - build string list of rowids
alert("Checkbox "+(i+1)+" is checked");
alert('got here '+i+'['+mm_item.value+']');
if (sel_list == '') {
sel_list = mm_item.value;
} else {
sel_list= sel_list + ", " + mm_item.value;
}
}
}
}