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? 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. 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. 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. Link to comment https://forums.phpfreaks.com/topic/200212-timed-messages-in-php/#findComment-1050709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.