Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Posts
    362
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Collapse link in Netscape

    I have a JavaScript that has drop downs where it uses pluses and minuses to make the link expand or collaspe.

    So for one of my collapse link like this:
    Code:
    +myLinkHere
    If I click on the link it will be like this:
    Code:
    -myLinkHere
    nextLink
    anotherLink
    moreLinks
    It works great in IE and Netscape 7 but cant get it to work with Netscape 4 because it just stays expanded in Netscape 4 like this all the time:
    Code:
    -myLinkHere
    nextLink
    anotherLink
    moreLinks
    It will not collapse.

    Is there something in NS4 or a script out there that will collapse and expand the links using Netscape 4??

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Collapse menu codes use, most of them, position:relative style, which is not recognizable by NS4.

    On the other hand you might have document.getElementById(id) as a reference for object, while NS4 uses document.layers[id].

    The solution is to use <layer><ylayer> nested tag markers and a small browsers detector -- if (document.getElementById)... else if(document.layers) --...

    take care, the NS4 equivalent for
    document.getElementById(id).style
    is
    document.layers[id]

    Unfortunately I have not NS4 installed on this PC I am working now, so I can not build and test a variant for you (There is a long time since I have build such a code, so I reckon I don't remember those by heart) ... Try google for some older examples.
    Last edited by Kor; 11-09-2004 at 12:26 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •