Reputation: 249
Is it possible to target specific content with an iframe? I'm going to give some fake code here because the url is behind a firewall.:
var container = sym.$("container");
var map = ' <iframe width="'+container.width()+'" height="'+container.height()+'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.fakesite.com"></iframe>';
container.html(map);
What I want to do is to target someone's name, their phone number, and their email. This is content that my company owns, so it's not illegal or jerky or anything. We want the content that's already in the system be dynamically displayed.
These would be in different domains.
Upvotes: 0
Views: 61
Reputation: 33409
If the iframe's URL is on the same domain as the original page, you can find the iframe with JS, access the contentDocument
property, and extract whatever HTML you need.
Upvotes: 1