

squeaky wrote:For a bet what I really need there is a personal custom popup available on middleclick instead of a menu.
this.showPopup = function(node) {
var popup = document.getElementById("custombuttons-contextpopup");
var x = node.boxObject.x;
var y = node.boxObject.y + node.boxObject.height;
document.popupNode = node;
popup.document.getElementById(node, x, y, "popup", null, null);
}
this.setAttribute("onclick", "this.showPopup(this);");var mP=document.createElement('menupopup');
for (var i=0;i<apps.length;i++){
if (apps[i] =='separator'){
mP.appendChild(document.createElement('menuseparator'));
}
else
{
if (!apps[i] [3]) apps[i] [3]='';
mP.appendChild(nMItem(apps[i] [0],apps[i] [1],apps[i] [2],apps[i] [3],this));
}
}
this.appendChild(mP);



var mP=document.createElement('menupopup');
for (var i=0;i<apps.length;i++){
if (apps[i] =='separator'){
mP.appendChild(document.createElement('menuseparator'));
}
else
{
if (!apps[i] [3]) {
apps[i] [3]='';
mP.appendChild(nMItem(apps[i] [0],apps[i] [1],apps[i] [2],apps[i] [3],this));
}
}
}
Users browsing this forum: Registered: 0 and 0 guests