Thread View: comp.lang.javascript
3 messages
3 total messages
Started by Rob Sedgwick
Wed, 14 Jul 1999 00:00
Netscape Blues
Author: Rob Sedgwick
Date: Wed, 14 Jul 1999 00:00
Date: Wed, 14 Jul 1999 00:00
32 lines
1542 bytes
1542 bytes
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? Rob -- E-mail: rsedgwick@justinfashanu.demon.co.uk ICQ UIN: 26075211 Homepage: http://www.justinfashanu.demon.co.uk Cockatiel Genetics: http://only.at/cockatiels
Re: Netscape Blues
Author: Doug Greenhough
Date: Wed, 14 Jul 1999 00:00
Date: Wed, 14 Jul 1999 00:00
48 lines
2186 bytes
2186 bytes
In article <931935618.8032.0.nnrp-03.d4e4e97b@news.demon.co.uk>, Rob Sedgwick <newsgroups@justinfashanu.demon.co.uk> writes >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? > >Rob > > >-- >E-mail: rsedgwick@justinfashanu.demon.co.uk >ICQ UIN: 26075211 >Homepage: http://www.justinfashanu.demon.co.uk >Cockatiel Genetics: http://only.at/cockatiels > > NS treats hidden images / layers as either in the head section, at the beginning of the document or not there at all. I've had a similar problem with rollover images, as if you hide them, it alters their position in the document.images[] array. Hopefully someone who uses NS a bit more than me will come up with a solution, but I have tried quite a few 'work-arounds' which don't work }8(. Doug -- Doug Greenhough the Spirit Demon mailto:doug@spirit.demon.co.uk http://www.spirit.demon.co.uk
Re: Netscape Blues
Author: 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads