Forum Moderators: open

Message Too Old, No Replies

Need <ilayer> help quick!

Why can't NN just support iframes? ::grumble::

         

mivox

6:57 pm on Mar 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, if I stick an iframe in the middle of a page, I can make a bunch of links on that page change the src page in the iframe with a simple target=framename attribute.

If I kludge it for NN by wrapping the iframe around an ilayer, the initial ilayer src page loads fine, but all those targeted links on the framing page open their content in new windows...

Is there ANY way to make a link on the primary page change the src file shown in an ilayer (without screwing up the function in IE)?

Macguru

7:00 pm on Mar 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No sure if I get you well. Tried _parent target?

mivox

7:08 pm on Mar 13, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK, PageA.html contains:

<iframe name="content" src="pageB.html"> (for IE/Opera)
<ilayer name="content" src="pageB.html"> (for NN)
</ilayer>
</iframe>

When you open PageA.html in your browser, both NN and IE/Opera will show pageB.html right where it belongs. What I need to do is put a link in the body content of PageA.html that will change the ilayer's content to pageC.html.

With the iframe, all I have to do is create a link on PageA.html that says:
<a href="pageC.html" target="content"> (just like a regular frameset)
The iframe content changes when you click the link in IE/Opera... in NN, instead of changing the content of the ilayer, it opens pageC.html in a new window.

It seems like the ilayer wouldn't be considered the _parent of PageA.html, would it?

T Suresh Babu

9:48 am on Mar 14, 2002 (gmt 0)

10+ Year Member



I tried the following code (pageA.html).

When I click the link("For Netscape") the ilayer changes it source. But the content on the other parts of the page is not active (ie) Iam not able click the other links in the pageA.html itself.

<<<<

<script>
function change()
{
document.layers["content"].src="pageA.html";
window.reload();
}
</script>
<iframe name="content" src="pageB.html"> (for IE/Opera)
<ilayer name="content" src="pageB.html"> (for NN)
</ilayer>
</iframe>
<br>
<a href="pageC.html" target="content">Link to C.html Targetting the content frame</a>

>>>>

mivox

6:25 pm on Mar 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



:) Thanks for trying... I ended up just making tons of duplicate pages. Defeats half the purpose of using the iframes, but due to the site structure, it's worth the trouble...