Y
Yereth Jansen
Hi all,
I am building my rightclick-menu into a dtree (javascript tree view). I
encountered a problem when right-clicking on the text within this tree,
namely that the event.offsetX is totally out of position when it is
called. The funny thing is that when I right-click on any of the images
the right-click menu shows exactly where the mouse-cursor is positioned
and it only acts funny when the link is right-clicked. This is my code,
with the css classes and ids removed to make it more readible:
---------------------------
<div class="dtree">
<div oncontextmenu="return launchContextMenu(0)">
<img src="folderopen.gif" />
<a href="url" onmouseover="window.status='root';return true;"
onmouseout="window.status='';return true;">root</a>
<div style="display:block;">
<div oncontextmenu="return launchContextMenu(3)">
<img src="joinbottom.gif" alt="" />
<img src="folderopen.gif" alt="" />
<a href="url" onmouseover="window.status='test';return true;"
onmouseout="window.status='';return true;" onclick="javascript:
documents.s(5);">test</a>
</div>
</div>
</div>
</div>
---------------------------
I use internet explorer 6. launchContextMenu() shows the right-click menu.
For the mouseposition I use the following code:
var left = event.offsetX;
var right = event.offsetY;
screenX and screenY act normal and return expected values.
Is anyone familiar with this problem? (the scrollbars are not the
problem, I tested that already.)
Thanks in advance,
Yereth
I am building my rightclick-menu into a dtree (javascript tree view). I
encountered a problem when right-clicking on the text within this tree,
namely that the event.offsetX is totally out of position when it is
called. The funny thing is that when I right-click on any of the images
the right-click menu shows exactly where the mouse-cursor is positioned
and it only acts funny when the link is right-clicked. This is my code,
with the css classes and ids removed to make it more readible:
---------------------------
<div class="dtree">
<div oncontextmenu="return launchContextMenu(0)">
<img src="folderopen.gif" />
<a href="url" onmouseover="window.status='root';return true;"
onmouseout="window.status='';return true;">root</a>
<div style="display:block;">
<div oncontextmenu="return launchContextMenu(3)">
<img src="joinbottom.gif" alt="" />
<img src="folderopen.gif" alt="" />
<a href="url" onmouseover="window.status='test';return true;"
onmouseout="window.status='';return true;" onclick="javascript:
documents.s(5);">test</a>
</div>
</div>
</div>
</div>
---------------------------
I use internet explorer 6. launchContextMenu() shows the right-click menu.
For the mouseposition I use the following code:
var left = event.offsetX;
var right = event.offsetY;
screenX and screenY act normal and return expected values.
Is anyone familiar with this problem? (the scrollbars are not the
problem, I tested that already.)
Thanks in advance,
Yereth