views:

99

answers:

2

Hi,

I want to get up to speed on element location and javascript.

ie. if someone clicks on an element, I can show a menu just below that element.

Now I realize I have to account for the fact that if someone clicks on a element to the extreme left/right or bottom of the page, I have to know if the menu is visible on the screen properly.

This seems complicated and would love if there is some tutorial on this very topic?

+3  A: 

This will help:

http://www.quirksmode.org/js/findpos.html

Luca Matteis
+2  A: 

A quick Google search yielded this result for a Prototype.js context menu. It looks to be exactly what you're looking for.

Dan Herbert