tbobker
11-18-2008, 10:52 AM
I am trying to create a onmouseover that is active after a certain amount of time. It does not seem to work.
My code below:
<html>
<head>
<script type="text/javascript">
function hiddentext(item)
{
var t=setTimeout(open(item),10000)
}
function open(banner){
document.getElementById(banner).style.display='block';
}
function clear(){
cearTimeout(t);
}
</script>
</head>
<body>
<div id="panel" style="background:#cccccc;display:none;">
Some information
</div>
<a href="#" onmouseover="hiddentext('panel');" onmouseout="clear();">Open</a>
</body>
</html>
Any help appreciated
My code below:
<html>
<head>
<script type="text/javascript">
function hiddentext(item)
{
var t=setTimeout(open(item),10000)
}
function open(banner){
document.getElementById(banner).style.display='block';
}
function clear(){
cearTimeout(t);
}
</script>
</head>
<body>
<div id="panel" style="background:#cccccc;display:none;">
Some information
</div>
<a href="#" onmouseover="hiddentext('panel');" onmouseout="clear();">Open</a>
</body>
</html>
Any help appreciated