How To Capture Clicks From Iframe On Another Domain?
I know this has cross site scripting limitations however I was wondering if there is a way to do this... I have a customer who uses a 3rd party website to present surveys to users.
Solution 1:
There is no way to do this due to the cross site scripting. If you had access to both the iframe content and the outer frame then you could have used events to communicate between the two. But of course you have no control over the iframe content.
If you had access then you could have post a message to get access to the events. Here is a plugin. http://benalman.com/projects/jquery-postmessage-plugin/
Solution 2:
Solution 3:
The short answer is: no. Not unless both scripts are on the same domain, for as the reason you identified: security reasons.
See http://softwareas.com/cross-domain-communication-with-iframes.
Post a Comment for "How To Capture Clicks From Iframe On Another Domain?"