By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,775 Members | 1,325 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,775 IT Pros & Developers. It's quick & easy.

Accessing an IMG tag within an IFRAME

P: n/a
Hi,

I was wondering if it is possible to access an <img> tag that is buried
within some external content in my site that is contained within an
iFrame on a page within my site... confusing i know! For example:

<html>
<head>
....
</head>
<body>
....
<div>
<iframe src="http://contentfromanothersiteihave">
<img src="img i want to get">
</iframe>
</div>
</body>
</html>

Obviously the ... means there is other stuff in there. Basically i want
to show the img from the other content but hide the rest of the content
on that page that is being loaded in the iframe. However, i'm not too
great with javascript and using document.images only references one
image (the main site's logo image).

Any help would be greatly appreciated.

Cheers
Bj

Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
th*******@gmail.com wrote:
I was wondering if it is possible to access an <img> tag that is buried
within some external content in my site that is contained within an
iFrame on a page within my site.


I doubt it. Security considerations put rather strict limits on what
JavaScript running from a webpage on one host to a page on another.

If you can, then the answer is in the FAQ.
http://jibbering.com/faq/#FAQ4_8

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.