Jump to content

setTimeOut


ZeroShade

Recommended Posts

I'm trying to make some text delay on visibility. But I can't seem to get the first part of the setTimeout right. Basically the ID="UnsupportedMessage" is part of a span tag and all it holds is plain text in it. After the time delay I want the text to become visible but be invisible before that timeDelay. Am I on the right path?

<script language="javascript" type="text/javascript">		var res = null;		var timeDelay = 5000;		var text = document.getElementById("UnsupportedMessage");				res = setTimeout("", timeDelay);	</script>

Link to comment
Share on other sites

You're not telling setTimeout to do anything. The setTimeout function needs a function name to call after the timeout.

function make_vis(){  document.getElementById("UnsupportedMessage").style.display = "block";}setTimeout("make_vis", 5000);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...