Click to See Complete Forum and Search --> : onMouseOut in the <STYLE> tag????


zkac054
10-17-2003, 12:23 AM
Is it possible to put the onMouseOut in the <STYLE> tag? I've tried it, but it doesn't work.

Basically everytime someone hovers over a link the window status changes. And when they move the window status returns to what it is originally.

So for every link I have they all have the same onMouseOut piece of code.

I'm just wondering if there is a faster way to implement this rather than simply writing the code out at every link.

Thanks

Khalid Ali
10-17-2003, 04:39 AM
no style element does not hae any events assosciated with it.

fredmv
10-19-2003, 06:43 PM
Originally posted by zkac054
So for every link I have they all have the same onMouseOut piece of code.Use a loop and make it dynamic. ;)<script type="text/javascript">
var a = null;
onload = function()
{
a = document.getElementsByTagName( "a" );

for( i=0; i<a.length; i++ )
{
a[i].onmouseout = function()
{
window.status = "";
}
}
}
</script>I hope that helps you out.