Three second timer
-
Hi Everyone, I've got an C# ASP.NET website which unreal..... But I have one small problem. I don't know how to implement a three second timer to run in the background of my webpage. I want a label to be displayed in red for three seconds and change to blue one the three seconds are up! Does anyone have sample code or ideas to help implement this? Thanks in advance! Michael
-
Hi Everyone, I've got an C# ASP.NET website which unreal..... But I have one small problem. I don't know how to implement a three second timer to run in the background of my webpage. I want a label to be displayed in red for three seconds and change to blue one the three seconds are up! Does anyone have sample code or ideas to help implement this? Thanks in advance! Michael
Could use javascript:
setTimeout( "setToBlue()", 3000 ); // 3 second timer
function setToBlue()
{
var label = document.getElementById( "your_label_id" ); // you'll need to figure out the exact id
label.style.color = "blue";
}This will run when the page loads.
- S 50 cups of coffee and you know it's on!
-
Could use javascript:
setTimeout( "setToBlue()", 3000 ); // 3 second timer
function setToBlue()
{
var label = document.getElementById( "your_label_id" ); // you'll need to figure out the exact id
label.style.color = "blue";
}This will run when the page loads.
- S 50 cups of coffee and you know it's on!
Legend with a few mods it worked like a charm...... thanks for all your help!! Take care, Michael