ilayer problems

Why does Netscape 4.x have to suck so bad

Page 1 of 1

13 Replies - 1628 Views - Last Post: 16 October 2001 - 02:48 AM

#1 PsychoFlame  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 24-July 01

ilayer problems

Posted 27 July 2001 - 08:21 AM

Ok.  Code first then explanation...

Here is the problematic code.

<td background="images/welcome.gif" width="617" height="55"><div class="navtext" style="width:600;height:50; position:relative; top:0px; left:0px;">
    <iframe border=0 height=50 width=600 noresize src="/internet/northside/northside.nsf/520a3a45865784fb85256a9600510609/b598650a872cdf8985256a9600513e7f?OpenDocument" STYLE="position:relative; top:0px; left:0px;"></iframe>
  <ilayer height=50 width=600 src="temp3.htm" ></ilayer>
</div> </td>

I also have this code in a seperate js file that is causing an error for netscape only:

function checkobjref(id) {
/*
Takes the ID of a positioned HTML element and returns an object reference.
*/
 // This function checks for DOM strategy, then
 // returns an object reference.
 if (document.all) {
   return document.all[id].style;
 } else if(document.layers) {
   return document.layers[id];
 }
}


if (document.layers) {
 var hidden = "hide";
 var visible = "show";
} else {
 var hidden = "hidden";
 var visible = "visible";
}
var toggle = "toggle";

function layerVisibility() {
 if (document.layers || document.all)
 {
   var inc, endInc=arguments.length;
   // run through the args (objects) and set the visibility of each
   for (inc=0; inc<endInc; inc+=2)
{
     // get a good object reference
     var daObj = checkobjref(arguments[inc]);
     if (arguments[inc+1] == hidden)
{
       // hide the object
       daObj.visibility = hidden;
     }
else if (arguments[inc+1] == visible)
{
       // show the object
       daObj.visibility = visible;
     }
else if (arguments[inc+1] == toggle)
{
       // toggle the object's visibility
       if (daObj.visibility == visible)
{
         daObj.visibility = hidden;
     }
else if (daObj.visibility == hidden)
{
         daObj.visibility = visible;
       }
     }
   }
 }
}

Ok.  What am I doing wrong here?  This works just how I want it to in IE but Netscape 4.x doesn't want to do it right the only thing I get are those two layers showing in the wrong spot and the javascript errors.  The entire rest of the page doesn't even show up.  The above code should be able to insert right into the page while still showing the other content on the page.

I would really appreciate any help.  Thanks alot :)


Is This A Good Question/Topic? 0
  • +

Replies To: ilayer problems

#2 nighthawk  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 1,269
  • Joined: 11-April 01

Re: ilayer problems

Posted 03 August 2001 - 11:12 PM

netscape just really sucks, what you want to work in netscape may never realistically work in netscape, it's always been that way, so here's what i would do, don't worry about looking for a way to fix the problem in netscape because there probably is no solution.  Hope this helps :)
Was This Post Helpful? 0
  • +
  • -

#3 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

Re: ilayer problems

Posted 05 August 2001 - 10:12 AM

yeah dont worry about it in NS it sucks anyway!
Was This Post Helpful? 0
  • +
  • -

#4 PsychoFlame  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 24-July 01

Re: ilayer problems

Posted 08 August 2001 - 07:18 AM

well.  I'd really really really love to, unfortunately this is for work and I have to maintain compatibility for NS 4.x, god i hate it.  I got rid of this part cause I didn't want to deal with it.  I just doesn't make any sense because its a freakin ilayer (which conveiently only Netscape 4.x is supposed to support) but that shitty browser cant even do it.  Sorry for the rant.  I just hate netscape pre version 6
Was This Post Helpful? 0
  • +
  • -

#5 nighthawk  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 1,269
  • Joined: 11-April 01

Re: ilayer problems

Posted 08 August 2001 - 08:06 AM

that's a big bummer, having to make sites work in both IE and Netscape (which really sucks by the way)...I feel for ya man...
Was This Post Helpful? 0
  • +
  • -

#6 goynang  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-August 01

Re: ilayer problems

Posted 08 August 2001 - 08:32 AM

Does the page in the ilayer contain full html tags (i.e. <html>.......</html>.

If so, do you reckon that when NS hits the </html> tag it ignores the rest of the page - even stuff outside the iLayer.

I had a similar problem on a site I was doing. Moving the iLayer right to the end of the page helped. As it's posioned absolutely anyway it doesn't matter where it is in the code.

Is this any use, or I have got the wrong end of the stick?

Goynang.

Was This Post Helpful? 0
  • +
  • -

#7 nighthawk  Icon User is offline

  • D.I.C Lover

Reputation: 0
  • View blog
  • Posts: 1,269
  • Joined: 11-April 01

Re: ilayer problems

Posted 08 August 2001 - 08:52 AM

hmm, that's something to think about, i never thought about that, it may just be that ns ignores everything after the </html>...thanks for suggesting that goynang, i'll take a look at my pages that aren't working in ns and see if that may be the problem...
Was This Post Helpful? 0
  • +
  • -

#8 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: ilayer problems

Posted 08 August 2001 - 10:28 AM

explorer already has close to 90 % of internet users i heard somewhere. so dont give a crap about it. u know the new netscape isnt shockwave enabled? a friends explorer crashed and hes waiting for a file from the ms guys so he has 2 use netscape. haha, he cant do flash, its hilarious.
Was This Post Helpful? 0
  • +
  • -

#9 goynang  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-August 01

Re: ilayer problems

Posted 08 August 2001 - 03:37 PM

Hello again,

I'm of the opinion that whilst Netscape does suck a lot (v6 less so, but still somewhat) if I can get my site working in it with only a small effort, then I will do so.

Seems no point in making a site unviewable to anyone unless you really have to. Most of the time the feature you are having problems with is just a stupid dhtml trick anyway and doesn't probably justify it's own existence in the first place.

Whilst we are currently moaning about NS4, how along before IE5 is just another ancient browser and we are moaning because it can't do this or that.

Anything too clever or tricky should be done on the server side if at all possible. (I know this isn't always possible, but often it is!)

Just my 2 cents!

Oh, btw - you'll probably want to add some positioning to you iLayer too. It won't just appear where you stick in the code. It needs to be positioned x and y. Can't remember the exact attributes but will look it up if you still have problems. Let me know....


Goynang.

(Edited by goynang at 5:42 pm on Aug. 8, 2001)

Was This Post Helpful? 0
  • +
  • -

#10 malkiri  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 3
  • View blog
  • Posts: 364
  • Joined: 29-March 01

Re: ilayer problems

Posted 09 August 2001 - 07:45 AM

I've found that in Netscpae, layers that have position:absolute tend to work more like you'd expect, as opposed to layers with position:relative. Of course, you lose the relative positioning, but my workaround for this was to put a 1x1 layer just before the real layer you're working with, and use it only for its coordinates. Then, once the page loads, you can move the layers to their correct positions. This works for the page I was writing because those layers weren't visible to start out with...if yours are, you'll get to see them in the upper left hand corner while the page is loading. Of course, to fix that, you could just make them invisible to begin with.
I can't explain why Netscape is so stupid...this was one of many problems I had with it.


Of course, IE liked every version I made. *pets IE and gives it a Scooby Snack*

Edit: Oh, and I feel your pain...we had to make our pages compatible with Netscape 4.7, too, mostly for our users. *curses Netscape users*

(Edited by malkiri at 4:47 am on Aug. 9, 2001)

Was This Post Helpful? 0
  • +
  • -

#11 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: ilayer problems

Posted 09 August 2001 - 07:58 AM

netscape 6 isnt even compatible for shockwave and when does view flash screws up. so my sites cant be compatible so i dont even try.
Was This Post Helpful? 0
  • +
  • -

#12 sk8er48035  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 131
  • Joined: 20-July 01

Re: ilayer problems

Posted 17 August 2001 - 06:48 PM

I'II keep this post simple for ya dude Netscape= Shitty :( MSIE5.5 =:):):):):):):):):):):)
Was This Post Helpful? 0
  • +
  • -

#13 capty99  Icon User is offline

  • i am colt mccoy
  • member icon

Reputation: 98
  • View blog
  • Posts: 10,081
  • Joined: 26-April 01

Re: ilayer problems

Posted 18 August 2001 - 02:58 PM

6 is better, cept for those errors which cause it to crash so frikkin often. :)
Was This Post Helpful? 0
  • +
  • -

#14 twum  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-September 01

Re: ilayer problems

Posted 16 October 2001 - 02:48 AM

Hi PsychoFlame,
I see in your code that you have the iframe code before the iLayer code. That may be the issue coz Netscape sees the iframe code before the ilayer one and it doesn't understand.
what if you nest the iframe code inside the ilayer code? Something like:
<iLayer>
  netscape code
     <nolayer>
        ie code
     </nolayer>
</ilayer>
Something like this should help.


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1