right click menu

right click menu


I have created a right click menu in outsystems project. And I have use the function below to locate the position of the menu "ie5menu". It works fine in old project under ie, chrome.
But it doesn`t work here. The menu doesn`t shown up by the mouse side. And it is far from the mouse in the page.
I don`t know why? Please have a look on it. Thanks a lot.

    var rightedge = document.body.clientWidth-event.clientX;
    var bottomedge = document.body.clientHeight-event.clientY;
    if (rightedge < ie5menu.offsetWidth)
        ie5menu.style.posLeft = document.body.scrollLeft + event.clientX -
        ie5menu.style.posLeft = document.body.scrollLeft + event.clientX;
    if (bottomedge < ie5menu.offsetHeight)
        ie5menu.style.posTop = document.body.scrollTop + event.clientY -
        ie5menu.style.posTop = document.body.scrollTop + event.clientY;
Please provide a complete example.

otherwise we judge purely on this code, but perhaps there are side-effects.
what do you mean by "it doesn't work here?", It's a strange sentence, because the effect is in the browser, so Outsystems should not have any effect on javascript.

Futhermore it's incomplete javascript, so I have no clue what the end-result will be.

can you add logging to the lines so you know what values are not correct.