Reputation: 125
I need to perform a search for a particular word in a file that i have embedded using
<object data = "".....>
How am i able to reference the
<object data>
just like in
<iframes>...
window.frames['iframe id'];
Upvotes: 0
Views: 108
Reputation: 2623
Use getElementsByTagName? My quick test:
<object data="http://www.google.com"></object>
<object data="2"></object>
And:
<script>
var el = document.getElementsByTagName('object');
console.log( el[0].data ); // http://www.google.com
console.log( el[1].data ); // http://localhost/2
</script>
Upvotes: 1