Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ILayers vs. IFrames 1

Status
Not open for further replies.

arlequin

Programmer
Sep 21, 1999
232
UY
Hi people, many thanx to your answers!!!<br>
<br>
I must work with the two browsers and I must work with IFRAMES and/or ILAYERS dependign on the browser<br>
<br>
but what is the better way to perform this?!!
 
one of the guys connected to the forum helped me with something like this<br>
<br>
&lt;body&gt;<br>
<br>
&lt;script language=&quot;javascipt&quot;&gt;<br>
if ((navigator.appName.toLowerCase().indexOf('micros')!=-1) &&<br>
(parseInt(navigator.appVersion)&gt;=4))<br>
{<br>
document.write('&lt;iframe src=\&quot;prueba.htm&quot;&gt;&lt;/iframe&gt;');<br>
}<br>
else <br>
if ((navigator.appName.toLowerCase().indexOf('netscape') &&<br>
(parseInt(navigator.appVersion)&gt;=4))<br>
{<br>
document.write('&lt;ilayer src=\&quot;prueba.htm&quot;&gt;');<br>
}<br>
&lt;/script&gt; <br>
<br>
&lt;/body&gt;<br>
<br>
but I can't make it work properly !!!<br>
<br>
what is my problem?
 
I think the problem lies in the document.write line,<br>
<br>
here is what I think it should read:<br>
document.write('&lt;ilayer src=\&quot;prueba.htm<b>\&quot;&gt;</b>&lt;/ilayer&gt;')<br>
notice the backslash before the second &quot; (section highlighted in bold.)<br>
<br>
with that in mind, try this:<br>
<br>
<i>&lt;body&gt;<br>
&lt;script language=&quot;javascipt&quot;&gt;<br>
if ((navigator.appName.toLowerCase().indexOf('micros')!=-1) &&<br>
(parseInt(navigator.appVersion)&gt;=4))<br>
{<br>
document.write('&lt;iframe src=\&quot;prueba.htm\&quot;&gt;&lt;/iframe&gt;');<br>
}<br>
else <br>
if ((navigator.appName.toLowerCase().indexOf('netscape') &&<br>
(parseInt(navigator.appVersion)&gt;=4))<br>
{<br>
document.write('&lt;ilayer src=\&quot;prueba.htm\&quot;&gt;');<br>
}<br>
&lt;/script&gt; <br>
&lt;/body&gt;<br>
</i><br>
all I changed was the backshash before the second quote.<br>
<br>
<br>
<br>
also, try this:<br>
<i>&lt;body&gt;<br>
&lt;script language=&quot;javascipt&quot;&gt;<br>
if (document.all){<br>
document.write('&lt;iframe src=\&quot;prueba.htm&quot;&gt;&lt;/iframe&gt;');<br>
}<br>
else if (document.layers)<br>
{<br>
document.write('&lt;ilayer src=\&quot;prueba.htm&quot;&gt;');<br>
}<br>
&lt;/script&gt; <br>
&lt;/body&gt;<br>
</i><br>
the second example deals with object detection, instead of browser detection. This may prove more or less effective, depending on your situation.<br>
<br>
Try it, and see if it fixes it.<br>
<p>theEclipse<br><a href=mailto: > </a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>
 
many thanks but my problem is that Netscape shows the prensa.htm file where HE WANTS!!<br>
<br>
:(<br>
<br>
please visit <br>
the prensa.htm file is the one with the flags
 
<i>&lt;script language=&quot;javascipt&quot;&gt;<br>
if (document.layers)<br>
{<br>
&nbsp;document.write('&lt;ilayer src=\&quot;prueba.htm&quot;&gt;&lt;/ilayer&gt;');<br>
}<br>
else if (document.all){<br>
&nbsp;document.write('&lt;iframe src=\&quot;prueba.htm&quot;&gt;&lt;/iframe&gt;');<br>
}<br>
&lt;/script&gt;</i><br>
<br>
This should work better longer...this way if Netscape eventually also adds a <i>document.all</i> object to it's browsers, it'll still check for the <i>document.layers</i> first...just in case they incorporate <i>document.all</i> before they impliment the <i>&lt;iframe&gt;&lt;/iframe&gt;</i> tags ;) <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= shared.freeservers.com/searchmaster.html>SearchMaster Interface...11-in-1</a><br>Wanting to learn Assembler; please e-mail me any tutorials or links for it that are useful to you :)
 
HEEELP!!!<br>
<br>
Can anybody tell me why this script works perfect in IE but not in Netscape Navigator ?!!<br>
<br>
I MUST place the prensa.htm file inside a cell but Netscape really pisses me off 'cause it throws <br>
the HTM file anyplace!!<br>
<br>
<br>
&lt;table border=&quot;0&quot; width=&quot;600&quot; height=280 border=0&gt;<br>
&lt;tr&gt;<br>
&lt;td width=&quot;50&quot; bgcolor=&quot;#FFFFFF&quot;&gt;<br>
&lt;p align=&quot;center&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;cosmetica/sitemap/alianzas/al_bullet1.gif&quot; width=&quot;22&quot; height=&quot;22&quot;&gt;&lt;/p&gt;<br>
&lt;/td&gt;<br>
&lt;td width=&quot;500&quot;&gt; <br>
&lt;script language=&quot;javascript&quot;&gt;<br>
if ((navigator.appName.toLowerCase().indexOf('micros')!=-1) && (parseInt(navigator.appVersion)&gt;=4))<br>
{<br>
document.write('&lt;IFRAME src=\&quot;prensa.htm\&quot; width=&quot;100%&quot; height=&quot;280&quot; frameborder=&quot;0&quot;&gt; [Su navegador no soporta marcos o no está configurado para verlos. De todas formas puede ver el documento a través de &lt;a href=&quot;prensa.htm&quot; target=&quot;_blank&quot;&gt; este enlace.&lt;/a&gt;]&lt;/IFRAME&gt;');<br>
}<br>
else <br>
if ((navigator.appName.toLowerCase().indexOf('netscape'!=-1) && (parseInt(navigator.appVersion)&gt;=4)))<br>
{<br>
document.write('&lt;ILAYER src=\&quot;prensa.htm\&quot;&gt; &lt;/ILAYER&gt;');<br>
<br>
}<br>
&lt;/script&gt;<br>
&lt;/td&gt;<br>
&lt;td width=&quot;50&quot; bgcolor=&quot;#FFFFFF&quot;&gt;<br>
&lt;p align=&quot;center&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;cosmetica/sitemap/comunidades/co_bullet1.gif&quot; width=&quot;22&quot; height=&quot;22&quot;&gt;&lt;/td&gt;<br>
&lt;/tr&gt;<br>
&lt;/table&gt;<br>

 
I don't see why there should be a difference. An ILAYER is a layer only it continues off of what is around it. Take the following:<br>
<br>
Blah blah blah blah &lt;ilayer&gt;blah&lt;/ilayer&gt;<br>
<br>
This should look like this:<br>
<br>
Blah blah blah blah blah<br>
<br>
It goes where the document tells it too. A regular layer would make the last blah and the first Blah to overlap. I would show you this if there was a way to do so on these forums. Remember that an ilayer will always go where the document wants it to, where as a layer goes where it wants to. <p>REH<br><a href=mailto:hawkdogg@crosswinds.net>hawkdogg@crosswinds.net</a><br><a href= by Linux</a><br>Learn Linux and Leave out the Windows :)
 
Ou est l'<i>ilayer</i> en la page de Netscape?<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Have you tried giving your <i>&lt;ilayer&gt;</i> tag <i>left=## top=##</i> arguments??? (I.E. <i>&lt;ilayer left=20% top=275 width=60%&gt;</i><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Maybe that would work for you....help make sure it doesn't get out of place :) <p>-Robherc<br><a href=mailto:robherc@netzero.net>robherc@netzero.net</a><br><a href= shared.freeservers.com/searchmaster.html>SearchMaster Interface...11-in-1</a><br>Wanting to learn Assembler; please e-mail me any tutorials or links for it that are useful to you :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top