facebox positioning problem when used in iframe page
21 views
Skip to first unread message
evo
unread,
Jul 24, 2008, 7:49:42 AM7/24/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to facebox
In my case I have to use facebox from within a iframe page, which has
fixed height and doesn't allow scroll. Facebox always open at the top
of the iframe page regardless of the scroll position of the parent
page.
Then I found this code in facebox.js which determines the dialog
position.
So facebox decides the dialog position based on the local scroll and
height of the current page only.
And probably because my iframe is from a different domain of the
parent window, I get access denied when tried to get the parent page
coordinates by window.parent. I can't find a workaround for this.
I think a better way is to determine the dialog position based on the
mouse click event which happens at some place on the page. Any way I
can do that? Otherwise I'll have to hardcode a y position for the
facebox dialog for now...