Hi my code returns all the html of the iframe. I would like just the body html. Any one know how to amend to suit?
Code:
alert( $("#uploaderIframe").contents()[0].documentElement.innerHTML );
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.
.. probably creates a new DOM node from the innerHTML of the iFrame – I actually suspect that
$(iframeHtml).find("body")is an empty jQuery object.Try
Ref: Traversing/contents