coupe-r Posted April 29, 2010 Share Posted April 29, 2010 Hey guys, Is it possible to echo a message to a user and have it last for 5-10 seconds and then disappear? I know I can refresh the page, but this would erase what they are typing / clicking on the current page. Any other way? Quote Link to comment https://forums.phpfreaks.com/topic/200212-timed-messages-in-php/ Share on other sites More sharing options...
Alex Posted April 29, 2010 Share Posted April 29, 2010 Something like this should be done in JavaScript. Quote Link to comment https://forums.phpfreaks.com/topic/200212-timed-messages-in-php/#findComment-1050698 Share on other sites More sharing options...
otuatail Posted April 29, 2010 Share Posted April 29, 2010 If this is a web page then you could do <meta http-equiv="refresh" content="600"> refresh after 600 seconds, but in your case send it to another page ie the home page Desmond. Quote Link to comment https://forums.phpfreaks.com/topic/200212-timed-messages-in-php/#findComment-1050704 Share on other sites More sharing options...
coupe-r Posted April 29, 2010 Author Share Posted April 29, 2010 AlexWD was correct. Javascript is the way to go. have 2 functions, one that shows and one that hides. The show function: window.setTimeout('hideConfirmationDiv()', 10000); Thanks for the help. Quote Link to comment https://forums.phpfreaks.com/topic/200212-timed-messages-in-php/#findComment-1050709 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.