menu non absolute positioning contextzone, and left click me

I would like to attach a context zone to an element which does not have absolute positioning. I do this, but it doesnt show up in the right place. If I make this change: y /= 2; x /= 2;

dhtmlXMenuObject.prototype._showContextMenu = function(x, y, zoneId) {y /= 2; x /= 2; if (this

Then it generally works. Is it supported to have context zones on non-absolute positioned elements?

Also, I would like the menu to be activated on a left click (perhaps in addition to a right click), since I dont think users would know to left click on a link. So I did this:

<a onclick=“this.oncontextmenu(event); return false” …

It looks like from your code this wont work for Opera, which is fine. Is there a better way to do this?




menu context zone should have absolute or relative position. In this case position will be calculated correctly.

There is showContextMenu(x,y) method that allows to show element in the necessary position. It can be called on any action