Show a message for num of seconds?
Moderator: General Moderators
Show a message for num of seconds?
How can I show a message to the user the way Wordpress does it? It doesn't have to fade out or anything funky, I just need it to hide after 10 seconds.
Re: Show a message for num of seconds?
I don't know how Wordpress does it, but I think you are looking for setTimeout()
There are 10 types of people in this world, those who understand binary and those who don't
Re: Show a message for num of seconds?
Code: Select all
function showMsg()
{
var t=setTimeout("document.write('test')",2000);
hideMsg();
}
function hideMsg()
{
var t=setTimeout("document.write(' ')",3000);
}Re: Show a message for num of seconds?
You need a DIV which will display/hide the message and write to its contents by using its innerHTML attribute.
There are 10 types of people in this world, those who understand binary and those who don't
Re: Show a message for num of seconds?
what?
*so much stuff to start with*