Article View: comp.lang.javascript
Article #206Re: Netscape Blues
From: Jim
Date: Wed, 14 Jul 1999 00:00
Date: Wed, 14 Jul 1999 00:00
37 lines
1752 bytes
1752 bytes
On Wed, 14 Jul 1999 07:58:10 +0100, "Rob Sedgwick" <newsgroups@justinfashanu.demon.co.uk> wrote: >I am trying to alter dynamically both the visibility and the href of a link. >I can do both fine in Netscape, but not at the same time. > >To alter the href I use: > >document.links[0].href = "dogs.htm"; > >To alter the visibility I have to surround each link by a <div> tag. > ><div id="geese1" STYLE="position:absolute; visibility:visible;"> > >Interestingly this doesn't worth without the position bit - is there a clue >there? > >Then I can do: > >document.geese1.visibility = "hide"; > >But the effect of putting the <div> tags in has made: > >document.links.length = 0 > >Is there a solution? NN 4 can only hide a layer, the position absolute creates a layer (you could use relative as an alternative.) however layer objects have their own heirachy so the link is now inside the layer not in the main document hence document.geese1.document.links[0].href='dogs.htm' is the way to change the URL. Jim.
Technical Details
Message-ID:
<378ca48b.25161490@news.mistral.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<931935618.8032.0.nnrp-03.d4e4e97b@news.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f76f2,acff9074ce6c9bc5 X-Google-Attributes: gidf76f2,public X-Google-Thread: fb3cb,acff9074ce6c9bc5 X-Google-Attributes: gidfb3cb,public From: Jim@jibbering.com (Jim) Subject: Re: Netscape Blues Date: 1999/07/14 Message-ID: <378ca48b.25161490@news.mistral.co.uk> X-Deja-AN: 500945918 References: <931935618.8032.0.nnrp-03.d4e4e97b@news.demon.co.uk> X-Complaints-To: usenet@starburst.uk.insnet.net X-Trace: starburst.uk.insnet.net 931964006 21348 195.184.228.238 (14 Jul 1999 14:53:26 GMT) Organization: INSnet Customer Posting NNTP-Posting-Date: 14 Jul 1999 14:53:26 GMT Newsgroups: comp.lang.javascript,demon.homepages.authoring