is it possible to determine the source of an iframe when it changes?
2 views
Skip to first unread message
rcoe67
unread,
Feb 11, 2009, 11:32:46 AM2/11/09
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 MochiKit
I have experimented with various methods of determining the href for
an iframe when it loads new content but to no avail. I can connect an
event listener that fires when the source changes but the source is
loaded from a different domain and security restrictions make it
impossible to use standard DOM methods to get at the contentDocument.
I have experimented with bind() but I don't know its functionality
well enough to know whether I can bind a local function to an iframe,
so that I can drill into the iframe's contentDocument. The other
thing I tried was to attach the onclick event to a local function,
with which I hope to access the link being clicked and determine the
href that way. Unfortunately, I can't seem to attach the onclick
event to the links in the iframe.
Does JavaScript security make it impossible to make this happen or can
I get the functionality I need with MochiKit?