Forum Moderators: open

Message Too Old, No Replies

controll popup position

         

NewVision

1:05 pm on Aug 29, 2002 (gmt 0)

10+ Year Member



I generated a (onClick) popup window, but I want it to appear next to the (onClick) link.
I know how to controll it with screenX,screenY and left,top coordinates, but this is not what I want.

Let me try to make it clear

"When you click on the link I want the popup window right next to it, no matter if you scrolled down and the link is in the bottom of the page or you scrolled up and the link is on the top of the page"

Any comment would help.

tedster

7:03 pm on Aug 29, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, NewVision.

"When you click on the link I want the popup window right next to it, no matter if you scrolled down and the link is in the bottom of the page or you scrolled up and the link is on the top of the page"

You can read the screen position where an event occurs with event.screenX and event.screenY. However, a link occupies some extended screen geography, not just one spot, so the onclick event could be fired anywhere in the link's active area. That makes it hard to write a script that uses the position data for the event and always opens the new window in the right spot.

NewVision

2:40 am on Aug 30, 2002 (gmt 0)

10+ Year Member



Thanks tedster. I got your point.

Regards,

ggrot

4:26 am on Aug 30, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you dont use a real popup window, you might be able to pull it off. Something like a hidden/unhidden div? Not too sure, but I think its possible.