473,729 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(sPa ge) {
//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.getEle mentById("Conte nt").style.disp lay="none";
document.getEle mentById("Conte ntNet").style.d isplay="none";
document.getEle mentById("Main" ).style.display ="";
}
else {
if (document.all) {
document.getEle mentById("Conte nt").style.disp lay="";
}
else {
document.getEle mentById("Conte ntNet").style.d isplay="";
}
document.getEle mentById("Main" ).style.display ="none";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document. getElementById( "ContentFrameNe t").src);
if (document.getEl ementById("Cont entFrameNet")) {
document.getEle mentById("Conte ntFrameNet").sr c = sURLSrc;
alert(document. getElementById( "ContentFrameNe t").src);
}
else {
document.layers["ContentFra me"].load(sPage + ".htm",100) ;
}
//change the images
TurnOffImages(s Page);
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="ContentFram e"
name="ContentFr ame" src="untitled.h tm" scrolling="auto " width="100%"
height="100%"></iframe>
</p>
<p id="ContentNet " style="display: none">
<ilayer top="0" left="0" visibility="sho w" src="untitled.h tm"
width="100%" height="100%"></ilayer>
</p>
'============== =============== =============== ===============

any help would be greatly appreciated.

tia

Scott
Jul 20 '05 #1
7 3688
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.goo gle.com...
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(sPa ge) {
//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.getEle mentById("Conte nt").style.disp lay="none";
document.getEle mentById("Conte ntNet").style.d isplay="none";
document.getEle mentById("Main" ).style.display ="";
}
else {
if (document.all) {
document.getEle mentById("Conte nt").style.disp lay="";
}
else {
document.getEle mentById("Conte ntNet").style.d isplay="";
}
document.getEle mentById("Main" ).style.display ="none";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document. getElementById( "ContentFrameNe t").src);
if (document.getEl ementById("Cont entFrameNet")) {
document.getEle mentById("Conte ntFrameNet").sr c = sURLSrc;
alert(document. getElementById( "ContentFrameNe t").src);
}
else {
document.layers["ContentFra me"].load(sPage + ".htm",100) ;
}
//change the images
TurnOffImages(s Page);
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="ContentFram e"
name="ContentFr ame" src="untitled.h tm" scrolling="auto " width="100%"
height="100%"></iframe>
</p>
<p id="ContentNet " style="display: none">
<ilayer top="0" left="0" visibility="sho w" src="untitled.h tm"
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(sPa ge) {
//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.getEle mentById("Conte nt").style.disp lay="none";
If your "Content" div is set to be not displayed, then changes will
never be viewable.
document.getEle mentById("Conte ntNet").style.d isplay="none";
document.getEle mentById("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.getEle mentById("Conte nt").style.disp lay="";
}
else {
document.getEle mentById("Conte ntNet").style.d isplay="";
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.getEle mentById("Main" ).style.display ="none";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document. getElementById( "ContentFrameNe t").src);
if (document.getEl ementById("Cont entFrameNet")) {
document.getEle mentById("Conte ntFrameNet").sr c = sURLSrc;
I cannot find any element with the id "ContentFrameNe t" in your provided
code, so there is nothing I can propose here.
alert(document. getElementById( "ContentFrameNe t").src);
}
else {
document.layers["ContentFra me"].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(s Page);
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="ContentFram e"
name="ContentFr ame" src="untitled.h tm" 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_Na me"?
</p>
<p id="ContentNet " style="display: none">
<ilayer top="0" left="0" visibility="sho w" src="untitled.h tm"
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:no ne".
So usage of "display:no ne" would be my first suspect - updating .src
worked for me on a visible IFRAME but failed for one hidden inside
"display:no ne".

As others have mentioned, ILAYER and document.layers are specific to
NS4. Since NS4.xx does not support document.getEle mentById 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:no ne" 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*******@ho t-R-E-M-O-V-E-mail.com> wrote in message news:<bk******* ***@news.eusc.i nter.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(sPa ge) {
//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.getEle mentById("Conte nt").style.disp lay="none";


If your "Content" div is set to be not displayed, then changes will
never be viewable.
document.getEle mentById("Conte ntNet").style.d isplay="none";
document.getEle mentById("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.getEle mentById("Conte nt").style.disp lay="";
}
else {
document.getEle mentById("Conte ntNet").style.d isplay="";


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.getEle mentById("Main" ).style.display ="none";
}

//navigate the iframe
var sURLSrc = "";
sURLSrc = sPage + ".htm";
alert(document. getElementById( "ContentFrameNe t").src);
if (document.getEl ementById("Cont entFrameNet")) {
document.getEle mentById("Conte ntFrameNet").sr c = sURLSrc;


I cannot find any element with the id "ContentFrameNe t" in your provided
code, so there is nothing I can propose here.
alert(document. getElementById( "ContentFrameNe t").src);
}
else {
document.layers["ContentFra me"].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(s Page);
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="ContentFram e"
name="ContentFr ame" src="untitled.h tm" 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_Na me"?
</p>
<p id="ContentNet " style="display: none">
<ilayer top="0" left="0" visibility="sho w" src="untitled.h tm"
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="ContentFram e"
name="ContentFr ame" src="untitled.h tm" 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
3931
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 popular browsers support it (mostly mozilla & the much hated IE, google says the do but nothing is better that experienced answer) - iFrames replaces the old frames once used in html to show a number of pages in a single windows, right ? - what are...
0
2099
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 IFRAMES and 2 IMGs tags. The problem is that the second IFRAME from the second page generates fires a new session.
4
4763
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 same directory) is to change the content of a layer, created with the <div...> tag, with an external text (clicking over an hiperlink) or with the result of a <form...> submition. The solution (I haven't been able to find anyone else) is to use a...
25
3903
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 { code for netscape users } If IE-test { code for ie users
4
2817
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 onClick="document.all.contents.innerHTML='<iframe width=643 height=232
6
2217
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 like as soon as I do that, it stops capturing events from that element. // // EditGUI is a simple WYSIWYG editor for chat
11
1673
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 with netscape... However, in asp.net it dosn´t seem to be an option... Do you guys know how compatible an asp.net page is with other browsers such
2
2093
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 have they been deprecated and will no longer be supported in the future? Please note that I'm *not* asking for opinions on the merits of using IFrames or IFrames vs regular framesets or any other such...
1
1333
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 Language="JavaScript"> var str = "<%=session.getAttribute( "userprivilege" )%>"; var str1 = "<%=session.getAttribute( "grpQuery" )%>"; if(str == null || str.indexOf("null") != -1) { alert("User Session Expired, Login...
0
8763
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9151
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8155
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4529
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.