casey wrote:
I am loading a frame on the right from a simple text menu in a frame on
the left.
Avoid frames in favor of positioned block elements where feasible.
What I would like is to be able to show the user which menu item they
selected last for example emboldening the item or showing a marker
against it.
Could anyone post a snippet of code or a link that might just point me
in the right direction.
Quick hack:
<script type="text/javascript">
function setStyleProperty(o, sProperty, value)
{
if (o
&& typeof o.style != "undefined"
&& typeof o.style[sProperty] != "undefined")
{
o.style[sProperty] = value;
}
}
var last = null;
function mark(e)
{
if (e)
{
var t = e.target || e.srcElement;
if (t && t.tagName.toLowerCase() == "a" && t.href)
{
if (!last)
{
setStyleProperty(last, 'fontWeight', '');
}
setStyleProperty(t, 'fontWeight', 'bold');
last = t;
}
}
}
</script>
<ul onclick="mark(event);">
<li><a href="foo">foo</a></li>
<li><a href="bar">bar</a></li>
</ul>
PointedEars
--
Bill Gates isn't the devil -- Satan made sure hell
_worked_ before he opened it to the damned ...