473,385 Members | 1,331 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 3650
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: maxim vexler | last post by:
I'm reading a lot of talks lately about the term iFrame and with your permission would like to ask a few question about that : - what is iFrame, i mean what is it good for ? - does all the...
0
by: Dan Popa | last post by:
Check out the following 2 links: http://www.batisdev.com/admin/test_1images.asp http://www.batisdev.com/admin/test_2images.asp First page contain 4 IFRAMES and 1 IMG tags. Second page contain 4...
4
by: Federico Bari | last post by:
Good morning all from italy, i have probably a compatibility problem with a html/javascript page. The aim of the code of the file test.htm you find here following (copy the 3 files in the...
25
by: Treetop | last post by:
I have seen some codes that can test for the browser and give values accordingly. I tried to read the FAQ, but was unable to find a simple version of this. What I want is If Netscape-test {...
4
by: Jon | last post by:
Hi, I have an iframe in a cell: <td id="contents" width="643"> <iframe width="643" height="232" src="home.asp" frameborder="0" scrolling="no"></iframe> </td> <td...
6
by: Vincent van Beveren | last post by:
Hey everyone, I have trouble capturing events in Netscape 7.1. I am building a WYSIWYG editor thingy which should both work in IE and NS 7. For this I use designMode='on'. However, it seems...
11
by: Kristoffer Arfvidson | last post by:
HI! I have a question.... when designing asp.net pages in vs.net I always see that labels are transformed to <span tags... I stopped using span and div before because of its lack of compatibility...
2
by: Guadala Harry | last post by:
1. Are IFrames supported only in uplevel versions of IE? If not IE exclusively, what browsers support IFrames? 2. Are IFrames going to be supported in the future - as far as anyone knows - or...
1
by: samduniya | last post by:
Hi All I have the following source code <HEAD> <iframe name = "myFrameName" src = " " id="myFrame" style = hidden width = 0 height = 0 frameborder = 0></iframe> <script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.