There is a function in a JavaScript file that retrieves a menu tree when users click on the parent item:
function menusel(unid)
{
//if its in the array, deactivate it and take it out
var index = inarray(unid,selectedarray);
//first arrange the array
if(index)
{
selectedarray[index] = 0;
}
else
{
//we have restrictions
if(treeRestrictMode==1)
{
//now check its not in the array of items not allowed to be picked
if(inarray(unid,nonSelArr))
{
alert('This Item is Unselectable');
return;
}
}
//if we are in unique tree mode, can only select one
if(treeSingleMode==1)
{
//check for a non-zero value, and deselect it [recursively]
for(var x=0;x<selectedarray.length;x++)
{
if(selectedarray[x]!=0)
{
menusel(selectedarray[x]);
}
}
}
selectedarray.push(unid);
}
sel_unselect(unid,index);
//if there is an override function, assume that the parent page has an input type function called treeSelFunc which takes the id and completes the rest
if(overrideFunction!='')
{
parent.parent.treeSelFunc(unid,selName);
return;
}
if(treeSingleMode!=1)
{
var selObj = emptySel(0);//set txt will fill it for us
}
else
{
var selObj = parent.parent.MM_findObj(selName);
//see if we have options..will need to empty them
if(selObj.size>1)
{
emptySel(1);
}
else
{
selObj.value=0;
}
}
setTxt(selObj);
selObj.fireEvent('onchange');
}
This function is called on a page like this:
<a id="troot[VMENU]_040" onclick="menusel(40);" class="sel">All</a>
But the following error is occurring: Uncaught TypeError: selObj.fireEvent is not a function
It used to work on an older browser version (possibly with Internet Explorer 8), but now it doesn't work on Chrome. Any ideas why?