Re: OT: need javascript/DOM help

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

 




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 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@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux