Linking content to an iFrame problem

liunx

Guest
I am working on a test page whereas I have an iFrame. I plan to have a few links that, when clicked, will display its content in a iFrame which is on the page.<br />
<br />
The content is to be various images...the problem I encounter is that when I click on the link, it opens the image in a new window instead of the iFrame.<br />
<br />
I even tried to keep the default name of the iFrame when renaming it had no effect.<br />
<br />
Does IE5 even understand iFrames???<br />
<br />
Below is the HTML code and all that I have as of now..it isn't much:<br />
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" <br />
"http://www.w3.org/TR/html4/strict.dtd"> <br />
<html> <br />
<body background="imgs/pink.jpg"> <br />
<title>iFrame Test Area</title> <br />
<iframe id="myIframe" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" <br />
width="40%" height="50%" src=http://www.webdeveloper.com/forum/archive/index.php/"imgs/imtitle.jpg" scrolling="no"></iframe> <br />
<style type="text/css"> <br />
a.link { <br />
color: black; <br />
text-decoration: none; <br />
font-weight: bold; <br />
} <br />
a.link:hover { <br />
color: red; <br />
} <br />
</style> <br />
<p><a href=http://www.webdeveloper.com/forum/archive/index.php/"imgs/elderman.gif" target="myIframe" class="link">Elderly Man Drawing</a><br> <br />
</body> <br />
<br />
<br />
</html><!--content-->In your iframe tag, if you change id="myIframe" to name="myIframe", I bet it will work better...<br />
<br />
Also, the <title> and <style> tag should go between <head> and </head> rather than in the <body>...<!--content-->Okay..thanks Pyro..I am gonna try it then. Thanks!<!--content-->No problem, man... :)<!--content-->Hey..it works now!..Who would've thought a mere thing like iframe id and iframe name would make such a difference! Anyways, thanks....<!--content-->Happy to help... :)<!--content-->
 
Back
Top