472,114 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,114 software developers and data experts.

Netscape 7.1 and IFrames/ILayers Src

Hello All,

I've been reading all of the various issues with Iframes in netscape.
I have tried all of the various fixes posted, and have even
implemented both an iframe and ilayer. My problem is that no matter
which i use, i can access the src before and after i change it, but
the page never displays. in IE6 it works no matter how i access it.
here is the code that is changing it:

function InternalNav(sPage) {
//this is called only by clicking a link on the page, no outside will
use this
//first see if the page is the home page...
if (sPage =="home") {
document.getElementById("Content").style.display=" none";
document.getElementById("ContentNet").style.displa y="none";
document.getElementById("Main").style.display="";
}
else {
if (document.all) {
document.getElementById("Content").style.display=" ";
}
else {
document.getElementById("ContentNet").style.displa y="";
}
document.getElementById("Main").style.display="non e";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document.getElementById("ContentFrameNet").s rc);
if (document.getElementById("ContentFrameNet")) {
document.getElementById("ContentFrameNet").src = sURLSrc;
alert(document.getElementById("ContentFrameNet").s rc);
}
else {
document.layers["ContentFrame"].load(sPage + ".htm",100);
}
//change the images
TurnOffImages(sPage);
return;

}
'================================================= ====
here is the code for the iframe/ilayer

<p id="Main" style="display:">
Main Content Here
</p>
<p id="Content" style="display: none">
<iframe align="top" frameborder="0" id="ContentFrame"
name="ContentFrame" src="untitled.htm" scrolling="auto" width="100%"
height="100%"></iframe>
</p>
<p id="ContentNet" style="display: none">
<ilayer top="0" left="0" visibility="show" src="untitled.htm"
width="100%" height="100%"></ilayer>
</p>
'================================================= ==========

any help would be greatly appreciated.

tia

Scott
Jul 20 '05 #1
7 3565
VK
A common mistake:
ILAYER has nothing to do with inline frames, despite it sounds "in the same
pattern" (this must be the reason of the mistake).
ILAYER was intended in ancient Netscapes (4.xx) to wrap a part of the
current content to move it relatively the place where such content would be
placed "by itself". ILAYER doesn't recognize mouse event and it doesn't
support .src property.
If you want to keep supporting legacy browsers, use <layer> (w/o "i")
Scott <al*************@hotmail.com> wrote in message
news:d2**************************@posting.google.c om...
Hello All,

I've been reading all of the various issues with Iframes in netscape.
I have tried all of the various fixes posted, and have even
implemented both an iframe and ilayer. My problem is that no matter
which i use, i can access the src before and after i change it, but
the page never displays. in IE6 it works no matter how i access it.
here is the code that is changing it:

function InternalNav(sPage) {
//this is called only by clicking a link on the page, no outside will
use this
//first see if the page is the home page...
if (sPage =="home") {
document.getElementById("Content").style.display=" none";
document.getElementById("ContentNet").style.displa y="none";
document.getElementById("Main").style.display="";
}
else {
if (document.all) {
document.getElementById("Content").style.display=" ";
}
else {
document.getElementById("ContentNet").style.displa y="";
}
document.getElementById("Main").style.display="non e";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document.getElementById("ContentFrameNet").s rc);
if (document.getElementById("ContentFrameNet")) {
document.getElementById("ContentFrameNet").src = sURLSrc;
alert(document.getElementById("ContentFrameNet").s rc);
}
else {
document.layers["ContentFrame"].load(sPage + ".htm",100);
}
//change the images
TurnOffImages(sPage);
return;

}
'================================================= ====
here is the code for the iframe/ilayer

<p id="Main" style="display:">
Main Content Here
</p>
<p id="Content" style="display: none">
<iframe align="top" frameborder="0" id="ContentFrame"
name="ContentFrame" src="untitled.htm" scrolling="auto" width="100%"
height="100%"></iframe>
</p>
<p id="ContentNet" style="display: none">
<ilayer top="0" left="0" visibility="show" src="untitled.htm"
width="100%" height="100%"></ilayer>
</p>
'================================================= ==========

any help would be greatly appreciated.

tia

Scott

Jul 20 '05 #2
DU
Scott wrote:
Hello All,

I've been reading all of the various issues with Iframes in netscape.
Have you?

Using Web Standards in Your Web Pages
http://www.mozilla.org/docs/web-deve...upgrade_2.html
I have tried all of the various fixes posted,
Have you?

Fixes posted are always about specific pages, defined issues, identified
problems. Some address general issues but most of the time posts in this
newsgroup are about specific, defined, identified webpage contexts,
precise questions.

and have even implemented both an iframe and ilayer.
"Because layers are not part of any W3C web standard, Netscape 6/7 and
Mozilla do not support layers. Like any other browser that doesn't
support layers, Gecko renders the HTML as if the LAYER, ILAYER, and
NOLAYER tags were not there."
http://www.mozilla.org/docs/web-deve...e_2.html#layer

Updating DHTML Web Pages for next generation browsers
http://devedge.netscape.com/viewsour...Tags%20Support
http://devedge.netscape.com/viewsour...#update-markup

My problem is that no matter which i use, i can access the src before and after i change it, but
the page never displays. in IE6 it works no matter how i access it.
here is the code that is changing it:

function InternalNav(sPage) {
//this is called only by clicking a link on the page, no outside will
use this
//first see if the page is the home page...
if (sPage =="home") {
document.getElementById("Content").style.display=" none";
If your "Content" div is set to be not displayed, then changes will
never be viewable.
document.getElementById("ContentNet").style.displa y="none";
document.getElementById("Main").style.display="";
}
else {
if (document.all) {
Right here, you're forking your code to support MSIE browsers and those
who supported document.all. So, you will end up with a different working
page depending on the browser visiting that page.
document.getElementById("Content").style.display=" ";
}
else {
document.getElementById("ContentNet").style.displa y="";
Since NS 7.1 does not support document.all, the code will be directed to
this line... and "ContentNet" is the paragraph with the ilayer
element... which we know is not supported by NS 7.1. So...
}
document.getElementById("Main").style.display="non e";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document.getElementById("ContentFrameNet").s rc);
if (document.getElementById("ContentFrameNet")) {
document.getElementById("ContentFrameNet").src = sURLSrc;
I cannot find any element with the id "ContentFrameNet" in your provided
code, so there is nothing I can propose here.
alert(document.getElementById("ContentFrameNet").s rc);
}
else {
document.layers["ContentFrame"].load(sPage + ".htm",100);
}
This part should have been for NS 4 since it refers to document.layers
but on the other hand it refers to a named iframe. So, this will never work.
//change the images
TurnOffImages(sPage);
return;

}
'================================================= ====
here is the code for the iframe/ilayer

<p id="Main" style="display:">
Main Content Here
</p>
<p id="Content" style="display: none">
<iframe align="top" frameborder="0" id="ContentFrame"
name="ContentFrame" src="untitled.htm" scrolling="auto" width="100%"
height="100%"></iframe>
You're giving the same identifier to your name and id attributes. This
is not recommendable for various reasons (debugging, intuitive code,
etc.). How about id="Iframe_id" and name="Iframe_Name"?
</p>
<p id="ContentNet" style="display: none">
<ilayer top="0" left="0" visibility="show" src="untitled.htm"
width="100%" height="100%"></ilayer>
</p>
'================================================= ==========

any help would be greatly appreciated.

tia

Scott

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #3
DU
VK wrote:
A common mistake:
ILAYER has nothing to do with inline frames, despite it sounds "in the same
pattern" (this must be the reason of the mistake).
ILAYER was intended in ancient Netscapes (4.xx) to wrap a part of the
current content to move it relatively the place where such content would be
placed "by itself". ILAYER doesn't recognize mouse event and it doesn't
support .src property.
If you want to keep supporting legacy browsers, use <layer> (w/o "i")


Can you show me any documentation, reference, ..anything.. where it says
that <layer> is supported by NS 6.x or NS 7.x?

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html

Jul 20 '05 #4
Scott wrote:
Hello All,

I've been reading all of the various issues with Iframes in netscape.
I have tried all of the various fixes posted, and have even
implemented both an iframe and ilayer. My problem is that no matter
which i use, i can access the src before and after i change it, but
the page never displays.


<snip>

There are various problems with IFRAMES under Mozialla/Netscape. For
example forms are not submitted from within iframes with "display:none".
So usage of "display:none" would be my first suspect - updating .src
worked for me on a visible IFRAME but failed for one hidden inside
"display:none".

As others have mentioned, ILAYER and document.layers are specific to
NS4. Since NS4.xx does not support document.getElementById or IFRAME
elements, there appears to be little point of pursuing NS4 support
within the envelope of the code posted.

To compound the problem, NS4 will happily, but irreversibly, process the
"display:none" style property value of the container paragraph, so
supplying a "click here to visit" link between start and end IFRAME tags
for use in browsers without IFRAME support won't be rendered. I believe
there are hacks available on CSS newsgroups to supply CSS styling which
is not recognised by Netscape 4, but this would still leaves hanging how
the page would behave in current browsers with javascript disabled.

Sorry about the bad news - please don't shoot the messenger :)

HTH,

Dom

Jul 20 '05 #5
thanks for the pointers DU, but still the question remains, that since
I was originally using a standard iframe to support the new browsers,
as your mozilla link recommends, why doesn't the page ever show in
netscape? i have used

frame['name'].src
frame['name'].location.href/reload

i change the setting for content div tag to visible prior to the src
change, and even if it is visible by default it doesn't show.

DU <dr*******@hot-R-E-M-O-V-E-mail.com> wrote in message news:<bk**********@news.eusc.inter.net>...
Scott wrote:
Hello All,

I've been reading all of the various issues with Iframes in netscape.


Have you?

Using Web Standards in Your Web Pages
http://www.mozilla.org/docs/web-deve...upgrade_2.html
I have tried all of the various fixes posted,


Have you?

Fixes posted are always about specific pages, defined issues, identified
problems. Some address general issues but most of the time posts in this
newsgroup are about specific, defined, identified webpage contexts,
precise questions.

and have even
implemented both an iframe and ilayer.


"Because layers are not part of any W3C web standard, Netscape 6/7 and
Mozilla do not support layers. Like any other browser that doesn't
support layers, Gecko renders the HTML as if the LAYER, ILAYER, and
NOLAYER tags were not there."
http://www.mozilla.org/docs/web-deve...e_2.html#layer

Updating DHTML Web Pages for next generation browsers
http://devedge.netscape.com/viewsour...Tags%20Support
http://devedge.netscape.com/viewsour...#update-markup

My problem is that no matter
which i use, i can access the src before and after i change it, but
the page never displays. in IE6 it works no matter how i access it.
here is the code that is changing it:

function InternalNav(sPage) {
//this is called only by clicking a link on the page, no outside will
use this
//first see if the page is the home page...
if (sPage =="home") {
document.getElementById("Content").style.display=" none";


If your "Content" div is set to be not displayed, then changes will
never be viewable.
document.getElementById("ContentNet").style.displa y="none";
document.getElementById("Main").style.display="";
}
else {
if (document.all) {


Right here, you're forking your code to support MSIE browsers and those
who supported document.all. So, you will end up with a different working
page depending on the browser visiting that page.
document.getElementById("Content").style.display=" ";
}
else {
document.getElementById("ContentNet").style.displa y="";


Since NS 7.1 does not support document.all, the code will be directed to
this line... and "ContentNet" is the paragraph with the ilayer
element... which we know is not supported by NS 7.1. So...
}

document.getElementById("Main").style.display="non e";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document.getElementById("ContentFrameNet").s rc);
if (document.getElementById("ContentFrameNet")) {
document.getElementById("ContentFrameNet").src = sURLSrc;


I cannot find any element with the id "ContentFrameNet" in your provided
code, so there is nothing I can propose here.
alert(document.getElementById("ContentFrameNet").s rc);
}
else {
document.layers["ContentFrame"].load(sPage + ".htm",100);
}


This part should have been for NS 4 since it refers to document.layers
but on the other hand it refers to a named iframe. So, this will never work.
//change the images
TurnOffImages(sPage);
return;

}
'================================================= ====
here is the code for the iframe/ilayer

<p id="Main" style="display:">
Main Content Here
</p>
<p id="Content" style="display: none">
<iframe align="top" frameborder="0" id="ContentFrame"
name="ContentFrame" src="untitled.htm" scrolling="auto" width="100%"
height="100%"></iframe>


You're giving the same identifier to your name and id attributes. This
is not recommendable for various reasons (debugging, intuitive code,
etc.). How about id="Iframe_id" and name="Iframe_Name"?
</p>
<p id="ContentNet" style="display: none">
<ilayer top="0" left="0" visibility="show" src="untitled.htm"
width="100%" height="100%"></ilayer>
</p>
'================================================= ==========

any help would be greatly appreciated.

tia

Scott

DU

Jul 20 '05 #6
DU
Scott wrote:
thanks for the pointers DU, but still the question remains,
You first need to clarify a few issues yourself and clarify your code.
The code you provided was a mess and I'm telling you this fair and square.
Reply with an url of your page so that we can see, test your page.

My recommendation is to drop entirely support for NS 4.x: just make sure
the content can be accessed for NS 4 though.

that since I was originally using a standard iframe to support the new browsers,
as your mozilla link recommends, why doesn't the page ever show in
netscape?
No one can seriously answer you without seeing the whole code involved.

i have used
frame['name'].src
frame['name'].location.href/reload

i change the setting for content div tag to visible prior to the src
change, and even if it is visible by default it doesn't show.


Validating your html document will help a lot:
http://validator.w3.org/
It is in your best interests as a web developer to properly code your
page so that it can interoperate on different user agents, and that it
can degrade as gracefully as possible in old or non-compliant browsers.

Finally, please avoid top-posting.

Jul 20 '05 #7
DU wrote:
here is the code for the iframe/ilayer
<iframe align="top" frameborder="0" id="ContentFrame"
name="ContentFrame" src="untitled.htm" scrolling="auto" width="100%"
height="100%"></iframe>

You're giving the same identifier to your name and id attributes. This
is not recommendable


Are you sure about this? My reading of the HTML 4.01 specification
indicates they must be the same:

<cite W3C HTML 4.01 recommendation, section 12.2.3>

It is permissible to use both attributes to specify an element's
unique identifier for the following elements: A, APPLET, FORM, FRAME,
IFRAME, IMG, and MAP. When both attributes are used on a single element,
their values must be identical.

</cite>

----
Dom

Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by maxim vexler | last post: by
reply views Thread by Dan Popa | last post: by
4 posts views Thread by Federico Bari | last post: by
25 posts views Thread by Treetop | last post: by
4 posts views Thread by Jon | last post: by
6 posts views Thread by Vincent van Beveren | last post: by
11 posts views Thread by Kristoffer Arfvidson | last post: by
2 posts views Thread by Guadala Harry | last post: by
1 post views Thread by samduniya | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.