I have a webpage where I have an Iframe. When someone clicks something in the Iframe I want to detect it in the parent window.
I see there are similar threads in the forum but no one solved my issue.
Zolka
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use the jQuery
.contents()method to retrieve the contents of the iFrame, and then search within that for your.click1elements.See the following jQuery code (works in v1.7 up):
EDIT: Wrapped it in a
.load()event handler.