homerUK
06-20-2004, 08:04 PM
Hey,
I am trying to make a right click menu (DIV layer) inside an iFrame... I can get it to position ok when the frame is on the left of the screen, but I am having problems with the co-ordinates, as the mouse click is relative to the iFrame, but the DIV layer positions itself in the main window.
I need a calculation based on the iframe width, height and the client window width and height - but I dont know where to begin!!
here's an example: www.mattfacer.com/test.htm
if you look at the source code you'll see that I get the client height etc, but dont know where to begin with a calc..
any help is appreciated!
:thumbsup:
www.mattfacer.com/test2.htm - there's an example of the menu when the iframe is not on the left....
I am trying to make a right click menu (DIV layer) inside an iFrame... I can get it to position ok when the frame is on the left of the screen, but I am having problems with the co-ordinates, as the mouse click is relative to the iFrame, but the DIV layer positions itself in the main window.
I need a calculation based on the iframe width, height and the client window width and height - but I dont know where to begin!!
here's an example: www.mattfacer.com/test.htm
if you look at the source code you'll see that I get the client height etc, but dont know where to begin with a calc..
any help is appreciated!
:thumbsup:
www.mattfacer.com/test2.htm - there's an example of the menu when the iframe is not on the left....