Forum Moderators: open

Message Too Old, No Replies

Navigation 1 link - 3 i-frames HELP

please asap

         

rico

1:36 pm on Jan 10, 2004 (gmt 0)

10+ Year Member



Ok, i know very basic html. And had someone design a layout for me using an image as the background and image map for the links. Site layout is basically 3 iframes (small left) (MAIN MIDDLE) (small right). Basically what im trying to get acoomplished is by clicking the link (on the image map it says the words of the navigationa nd the link opens a page) and opening a page in the left i-frame and the main middle i-frame. the 3rd i-frame is pretty much going to contain the same content, so thats not necessary to change. However i am having a lot of problems with this i searched around and i found some insight here, but when i tried to apply the code as it said i came up with several different errors trying to mix/match the code to fit.. So please anyone that can help please do so. I put below the coding i have for the site. Any insight on this would be great, and ASAP. GREATLY appreciated!


<HTML>
<HEAD>
<TITLE></TITLE>
<script>
function twoFrameChange(left,middle){
left.1.location.href = left;
middle.2.location.href = middle;
}
</script>

</HEAD>
<BODY bgcolor="#000000" scroll="no">

<center>
<IMG NAME="image0" SRC="img/image.jpg" WIDTH="780" HEIGHT="585" BORDER="0" USEMAP="#image">

<MAP NAME="image">
<AREA SHAPE="rect" COORDS="393,187,419,198" HREF="http://www.site.com/news.html" target="1">
<AREA SHAPE="rect" COORDS="425,187,450,198" HREF="http://www.site.com/band.html">
<AREA SHAPE="rect" COORDS="457,188,497,198" HREF="http://www.site.com/gallery.html">
<AREA SHAPE="rect" COORDS="502,188,540,199" HREF="http://www.site.com/lyrics.html">
<AREA SHAPE="rect" COORDS="546,188,574,198" HREF="http://www.site.com/music.html">
<AREA SHAPE="rect" COORDS="580,188,631,199" HREF="javascript:twoFrameChange('itsover.html','getup.html');">
<AREA SHAPE="rect" COORDS="590,199,631,208" HREF="http://www.site.com/contact.html">
<AREA SHAPE="rect" COORDS="554,198,585,208" HREF="http://www.site.com/forum.html">
<AREA SHAPE="rect" COORDS="498,199,548,208" HREF="http://www.site.com/guestbook.html">
<AREA SHAPE="rect" COORDS="461,198,492,209" HREF="http://www.site.com/links.html">
<AREA SHAPE="rect" COORDS="426,198,455,209" HREF="http://www.site.com/merch.html">
<AREA SHAPE="rect" COORDS="390,198,420,209" HREF="http://www.site.com/shows.html">
</MAP>
</center>

<div style="position: absolute; top:235; left:128">
<iframe FRAMEBORDER="0" BORDER=0 marginwidth=0 marginheight=0 hspace=0 vspace=0 width=124 height=320 src="1.html" name=1 allowTransparency scrolling=auto style="FILTER: chroma (color=40FF40)"></iframe>
</div>

<div style="position: absolute; top:235; left:267">
<iframe FRAMEBORDER="0" BORDER=0 marginwidth=0 marginheight=0 hspace=0 vspace=0 width=486 height=320 src="2.html" name=2 allowTransparency scrolling=auto style="FILTER: chroma (color=40FF40)"></iframe>
</div>

<div style="position: absolute; top:235; left:767">
<iframe FRAMEBORDER="0" BORDER=0 marginwidth=0 marginheight=0 hspace=0 vspace=0 width=124 height=320 src="3.html" name=3 allowTransparency scrolling=auto style="FILTER: chroma (color=40FF40)"></iframe>
</div>

</BODY>
</HTML>

tedster

7:52 am on Jan 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The first thing that jumps out at me is that except for the first link in the image map, you have no target attributes there. You need those if you just want to load a document into the appropariate iframe rather than reload the entire window. If you want a page to load in an iframe with the attribute name="1" then you add the attribute target="1" to the link.

Second thing I noticed is that the link for changing two iframes is pure javascript, so it most likely will not allow spiders to index those pages. This may be OK with you, but if not, it needs to be something like:

<AREA SHAPE="rect" COORDS="580,188,631,199" HREF="itsover.html" onClick="javascript:twoFrameChange('itsover.html','getup.html');return false">

...and even then getup.html will be problematic, unless you have a plain link to it somewhere -- on your sitemap page or elsewhere on this page.

Does the javascript function for changing two iframes work for you when you click on the sixth area of the image map? It looks OK to me, but I could be missing something.

[discussion continues here:
[webmasterworld.com...]