I just wanna learn how to read Iframe content in onLoad event of iframe and write it’s content to the main page ? Thanks..
Share
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.
I have struggled with same this past day. It seems to matter how you access the iframe. If you use
document.getElementById()you get an Iframe object, which has noonloadevent. However, if you access throughwindow.frames[]array, for exampleyou get a window object, which does have onload event.
(ie uses the frame id attribute , but ff uses name attribute. So use both and make the same)
You can then assign
Notice, since iframeWindow is a window object, you use window syntax to access content.