GinsBabu Posted January 5, 2010 Share Posted January 5, 2010 Hi, In my form i have a button which calls a js function to do some action.After the action a message shows.I want to know how can i hide the div if the message has been shown for 10 second.Any help? Link to comment https://forums.phpfreaks.com/topic/187211-hide-div/ Share on other sites More sharing options...
corbin Posted January 5, 2010 Share Posted January 5, 2010 Look into setTimeout. setTimeout('functionThatHidesDiv()', 10000); Link to comment https://forums.phpfreaks.com/topic/187211-hide-div/#findComment-988684 Share on other sites More sharing options...
GinsBabu Posted January 5, 2010 Author Share Posted January 5, 2010 Hi.. Thanks for the reply .... well i was working on that but had some problem..... my code have a div tag like this.. <div id="d" style="display:inline"> <?php echo $this->message;?> </div> and the js function sendStatusReport(){ document.listclientchoosen.action = "<?php echo $this->baseUrl;?>/admin/clientexports/report"; document.listclientchoosen.submit(); setTimeout("toggle()", 8000 ); } function toggle() { var ele = document.getElementById("d"); ele.style.display = "none"; } Wat am i doing wrong....??also the action performing inside the sendstatusreport() is mail sending.So it may took 8s or 10 s or 15 s.How can excatly point out the time. Link to comment https://forums.phpfreaks.com/topic/187211-hide-div/#findComment-988712 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.