Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] layers NN4x


  • From: javascript@xxxxxxxxxx (Nancy Burton-Vulovic)
  • Subject: [Javascript] layers NN4x
  • Date: Fri, 19 Jul 2002 10:34:23 -0400

Not strictly Javascript, please forgive:

I am trying to fix (somebody else's) code - they have a layers command like
so:

<DIV id=Layer2
            style="Z-INDEX: 2; LEFT: 170px; VISIBILITY: hidden; WIDTH:
410px;  POSITION: absolute; TOP: 475px; HEIGHT: 262px">

In IE, the text is indeed 410px. In Netscape, it's about half that width. If
I set the clipping width to 410 within the style line (CLIP.WIDTH:410; ),
then it's the right width for Netscape - but of course, the visibility is no
longer hidden.

I've tried the following (last line is my addition):

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null)
{ v=args[i+2];
    if (obj.style) { obj=obj.style;
v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v;
    if (obj.visibility=='visible') {obj.clip.width='410';}}

but it doesn't seem to recognize clip.width as a property of obj, although
it does if you put it in the style line itself.

help?!

Nancy