just curious if it’s possible to inspect an iFrame with src set to some other website for it’s elements?
for instance checking with jQuery if the iFrame contains a <div class="hello">
is that possible?
thank you for your help
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.
Again, no.
It would be a security hole if you could even look at the contents of another site (on which the user might have sensitive information!). You want to find out if a page has a certain div on it, you’ll have to fetch that page from your server (which means no user credentials) and look. You can do it from the client using XMLHttpRequest to your server acting as a proxy if you like.