Reputation: 2966
I have a HTML page where part of its contents is an external web page loaded into it with a HTML object tag like this:
<object data="someUrl-on-different-domain-than-host" type="text/html"></object>
Now, through jQuery or similar, I want to manipulate the contents of <div id="mydiv">
in the page that someUrl represents.
Is that possible? If yes, how?
Thanks :-)
Upvotes: 0
Views: 324
Reputation: 1600
use Jquery load
$("#mydiv").load("YOUR_URL");
your content from provided will be load into this div automatically
updated
If you want to get some specific content like a div with id mychilddiv you can do it like
$("#mydiv").find('#mychilddiv');
Upvotes: 1