Forum Moderators: open
...someaction...
divclicknext.innerHTML = 'foobar' ;
} -end of function
where "divclicknext" is <div id="clicknext"></div>
I need to DELAY the display of "divclicknext" or the innHTML
(sorta like the reverse of those "fade" techniques)
AFTER "someaction"
How can this be done?
tia
and a warm welcome to these forums. ;)
Have a look at this, it may give you some ideas...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>fade in foobar</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="Content-Script-Type" content="text/javascript"/>
<meta name="Content-Style-Type" content="text/css"/>
<style type="text/css">
<!--
body {
background-color:#ccc;
}
#clicknext {
font-family:verdana,arial,helvetica,sans-serif;
font-size:28px;
color:#000;
text-align:center;
width:100px;
background-color:#fff;
border:3px double #000;
padding:5px;
margin:20px auto;
}
-->
</style>
<script type="text/javascript">
//<![CDATA[
var col=255;
var speed=50;
function fadeIn() {
document.getElementById('clicknext').style.visibility='visible';
document.getElementById('clicknext').style.color='rgb('+col+','+col+','+col+')';
if(col>0) {
col--;
setTimeout('fadeIn()',speed);
}
}
//]]>
</script>
</head>
<body onload="document.getElementById('clicknext').style.visibility='hidden';fadeIn()">
<div id="clicknext">foobar</div>
</body>
</html>
birdbrain