Forums

This topic is locked

can some please check my iframe & targeting code?

Posted 14 Feb 2004 00:21:47
1
has voted
14 Feb 2004 00:21:47 David too posted:
Hi there

need some help with a prob and will do my best to make it clear....

My "hmpage.html" has an "iframe" that calls up diffrent pages using the nav buttons on the "hmpage.html"

one of those pages It calls up is "gallery.html" & on this page:

I have a table split in 2

1) cell 1 is an iframe
2) cell 2 has a placeholder

in cell2, the iframe calls up "image_list.html"

When you click on the image link, a image shows in "place holder".

My prob is.....it only works in NE/Safari/MoZ/etc.....But NOT in IE5!!!!....nuts<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

In IE5 when u click on a link in the image list (cell 1, iframe), image1.jpg shows up in the iframe instead of the place holder.

messed up, I think it's how Im targeting the links, not sure.....mind boggled, need to wk in IE

I know basic concept of "iframes" and I followed a javascipt tutorial on "image lists", tried to tie the 2 together, but just not quite there. This is the javascript in the head of:

<b>"gallery.html"</b>


<pre id=code><font face=courier size=2 id=code>&lt;script type="text/javascript" language="javascript"&gt;
function showPic (whichpic) {
if (document.getElementById) {
document.getElementById('placeholder').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} else {
return true;
}
}
&lt;/script&gt;
&lt;script language="JavaScript" type="text/JavaScript"&gt;
&lt;!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape"&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//--&gt;
&lt;/script&gt;</font id=code></pre id=code>

<b>This is the iframe code in 'gallery.html</b>

<pre id=code><font face=courier size=2 id=code>&lt;IFRAME name=content src=menu.html width=168 height=400 frameborder=0 scrolling=auto&gt;
&lt;/IFRAME&gt;&lt;/td&gt;</font id=code></pre id=code>


<b>This is the link code in "menu.html"</b>


<pre id=code><font face=courier size=2 id=code>&lt;a href="image1.jpg" title="family photo" target="content" onclick="return showPic(this)"&gt;&lt;img src="/images/images1.jpg" width="75" height="57" border="0"&gt;&lt;/a&gt;</font id=code></pre id=code>


thanks<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Replies

Replied 14 Feb 2004 00:25:53
14 Feb 2004 00:25:53 David too replied:
forgot this

gallery.html

<pre id=code><font face=courier size=2 id=code>&lt;td colspan="6" bgcolor="#CCCCCC"&gt;&lt;img src="/mainmenu_buttons"id="placeholder"&gt;&lt;/td&gt;</font id=code></pre id=code>


I hope it all makes sense<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Reply to this topic