> What I'm trying to accomplish is to "display:none" or "display:block" the
> following element whenever the <a> is onclicked.
>

Maybe this will help you to accomplish the flip flop part of your situation

<script type="text/javascript">
function flipflop(element){
var foo;
foo = document.getElementById(element);
if(foo.style.display != 'block')
{
foo.style.display = 'block';
}
else
{
foo.style.display = 'none';
}
}
</script>

now you can simply:
<a onclick="flipflop('SOME_ELEMENT');">Flip Flop some thing</a>

if this isn't what you need or if you can't apply the nextSibling thing on
the above function, then please tell...


>
> As you pointed out "document.getElementById()" returns not the id, but the
> href.  (That really puzzles me and differs from the O'Reilly books on
> Javascript and Dynamic HTML).
>
> Is this a known bug?  If it is I will have to wrap my tags in such a way
> that I can find the other node relative to it some other way.
>

it may be a known bug for Mozilla like browsers
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Reply via email to