[thelist] NavBar, highlighting current link
Tom Dell'Aringa
pixelmech at yahoo.com
Fri Feb 21 11:41:06 CST 2003
Ok Kevin, from scratch - not working in IE6 is useless. This should
work but untested:
====================
function setHighlightedClass()
{
var anchors = document.getElementsByTagName("A");
for(var i in anchors)
{
if (anchors[i].className == "plainClass" && anchors[i].id ==
"currentPage")
{
anchors[i].className = "highlightedClass";
}
}
}
Call this using onLoad(). Tag the anchor on the page you want with
id="currentPage" and set your plainClass and highlightedClass.
Let me know if it works!
HTH
Tom
=====
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.pixelmech.com/
var me = tom.pixelmech.webDeveloper();
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
More information about the thelist
mailing list