• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Problem with <iframe> and image map in html

nightcrawler

New Member
I am unable to use Image maps while using a internal frame in my webpage. Consider the following code:
<!-- The Image Map -->
<MAP NAME="topbar">
<AREA SHAPE="RECT" HREF="url here" TARGET="_new" ALT="Alt text." TITLE="Title!" COORDS="652,7, 744,42">
<AREA SHAPE="RECT" HREF="url" ALT="Alt text." TITLE="Title!" COORDS="25,12, 160,58">
</MAP>
<!-- End of Image Map -->


<DIV ID="idElement1" style="position:absolute; top:0px; left:0px; width:754px; height:82px;">
<img src="hpgfiles\topbar.gif" USEMAP="#topbar" WIDTH=754 HEIGHT=82 NAME="idElement1Img" ID="idElement1Img" BORDER="0">
</DIV>
<DIV ID="idElement2" style="position:absolute; top:83px; left:137px; width:604px; height:414px;">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=604>
<TR VALIGN=top>
<TD>
<DIV align=left>
<FONT CLASS=Arial-16pxn>
<iframe name="internal" src="home.htm" border="0" scroling="no" width="100%" height="100%></iframe>
</FONT>
</DIV>
</TD>
</TR>
</TABLE>
</DIV>



If i place the Image map above the <iframe>, Image map works and <iframe> is not showing home.htm. If i keep the Image map below the <iframe>, home.htm gets loaded in the internal frame but Image map is not working. The image just acts like a plain image without any links.
I need <iframe> in the page and the image with links (Mapped) too. Can anyone help?What to do to make the both work?
 
try to put image map and iframein different table cell (like <table><tr><td><table><tr><td><!--Iframe--></td></tr></table></td></tr><tr><td><table><tr><td><!--ImageMap--></td></tr></table></td></tr></table>
 
I've got the problem...

In the <iframe> code,

<iframe name="internal" src="home.htm" border="0" scroling="no" width="100%" height="100%></iframe>


I forgot to close the height="100%". It's working. Image maps and <iframe> can work together!

Phew! It wasted a lot of time.:doh!: :doh!: :doh!:
 
Back
Top