Dennis Allen wrote:[color=blue]
> I was hoping for a way that didn't involve passing another parameter,[/color]
but it'll work...Dennis[color=blue]
>
> "eric" <ericcremer@yahoo.com> wrote in message[/color]
news:1107817797.548584.201450@l41g2000cwc.googlegr oups.com...[color=blue][color=green]
> > Hi,
> > Howabout something like this:
> >
> > <script>
> > function myfun(good,stuff){
> > if (stuff.type=="click") theevent="click event"
> > if (stuff.type=="mouseover") theevent="mouse over event"
> > alert(theevent)
> > }
> > </script>
> >
> > <a id="fred" href="urlhere" onclick="myfun(this,event)"
> > onmouseover="myfun(this,event)" >Object stuff</a>
> >
> > For (lots of ) details and browser compatibility check out:
> >
http://www.webreference.com/js/column9/index.html
> >[/color][/color]
Just for the sake of argument....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>untitled</title>
<style type="text/css">
a {
width: 100px;
}
#t {
width: 100%;
height: 560px;
border: none;
font: 11px monospace;
}
</style>
<script type="text/javascript">
function Outline(e)
{
e = e || window.event;
if (e && (txt = document.getElementById('t')))
{
var p, c = [];
for (p in e)
c.push(p + ' ---> ' + e[p]);
txt.value = c.join('\n');
}
}
window.onload = function()
{
document.getElementById('t').value = '';
if (a = document.getElementsByTagName('a').item(0))
{
a.onmouseover = Outline;
a.onmouseout = Outline;
}
}
</script>
</head>
<body>
<a href="#">hoo-hah</a>
<textarea id="t"></textarea>
</body>
</html>