add:  v.setAttribute("oncommand", "ToggleColumnState(this, document)"); 
context: function BuildTreePopup( treeColGroup, treeHeadRow, popup, skipCell ){  var popupChild = popup.firstChild;  if (popupChild)    return;  var currTreeCol = treeHeadRow.firstChild;  var currColNode = treeColGroup.firstChild;  while (currTreeCol) {    if (skipCell != currTreeCol) {		// Construct an entry for each cell in the row.		var columnName = currTreeCol.getAttribute("value");		var v = document.createElement("menuitem");		v.setAttribute("type", "checkbox");		v.setAttribute("value", columnName);		if (columnName == "") {		  var display = currTreeCol.getAttribute("display");		  v.setAttribute("value", display);		}		v.setAttribute("colid", currColNode.id);		v.setAttribute("oncommand", "ToggleColumnState(this, document)");		var hidden = currColNode.getAttribute("hidden");		if (hidden != "true")		  v.setAttribute("checked", "true");		popup.appendChild(v);	}	currTreeCol = currTreeCol.nextSibling;	currColNode = currColNode.nextSibling;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5823e8d097a965c9a199680e819a08b00ae1fd2b/treePopups.js/buggy/xpfe/global/resources/content/treePopups.js