PDA

View Full Version : Display Code After Some Many Seconds



Private_Guy
09-07-2007, 07:23 PM
Hi there,

I dont know if I should post this in JavaScript or PHP and other codes because I dont know what suits this. I want make a code, which after some many seconds it will disply the code.

Example:

<html>
<? After 3 seconds disply ?>
Hello
else
null
<end>

You know, something like that :).

Thanks.

Best Regards,
Chill_Guy

Twey
09-08-2007, 01:29 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Page Sans Titre</title>
</head>
<body>
<div id="delayed_show">
<script type="text/javascript">
document.getElementById('delayed_show').style.display = 'none';
</script>

<p>Some code that you want to display a little later goes here.</p>
</div>
<script type="text/javascript">
setTimeout(function() {
document.getElementById('delayed_show').style.display = 'block';
}, 3 * 1000);
</script>
</body>
</html>