How can I pass attribute value from iframe to parent?
I.e. iframe (frame1) has <a id="a1" href="http://www.infinitybusiness.net">. How can I get value of href in my parent page?
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.
This is a great tutorial that talks exactly about that:
http://www.roseindia.net/java/pass-value-example/pass-value-from-iframe-parent.shtml
you can use it only if the two pages are served from the same domain.
There are many solution for cross-domain scripting as well..you can read more here:
http://softwareas.com/cross-domain-communication-with-iframes