logged_with_bugmenot Posted July 13, 2007 Share Posted July 13, 2007 hello... because i have no real clue of coding and some guys here can help me, i wanted to ask you something i need a java popup with a timer for my page... for example, the popup should only appear from 24:00 till 06:00 CET... when i click: enter my page, the popup should appear in behind only in this time period... can anyone help me? thanks Link to comment https://forums.phpfreaks.com/topic/59864-popup-help/ Share on other sites More sharing options...
chronister Posted July 13, 2007 Share Posted July 13, 2007 well first you need to clarify... do you want Java or JavaScript? they are 2 different things Link to comment https://forums.phpfreaks.com/topic/59864-popup-help/#findComment-297663 Share on other sites More sharing options...
logged_with_bugmenot Posted July 13, 2007 Author Share Posted July 13, 2007 javascript.. at the moment i have this one on my enter image: onclick="window.open('http://blabla.com/', '_blank', 'channelmode=no,directories=yes,fullscreen=no,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,top=0,left=0,height='+screen.availHeight+',width='+screen.availWidth+'');window.focus();" now i need the same popup with a timer between the stated hours :/ Link to comment https://forums.phpfreaks.com/topic/59864-popup-help/#findComment-297668 Share on other sites More sharing options...
logged_with_bugmenot Posted July 14, 2007 Author Share Posted July 14, 2007 no one? Link to comment https://forums.phpfreaks.com/topic/59864-popup-help/#findComment-298364 Share on other sites More sharing options...
logged_with_bugmenot Posted July 16, 2007 Author Share Posted July 16, 2007 push push Link to comment https://forums.phpfreaks.com/topic/59864-popup-help/#findComment-299442 Share on other sites More sharing options...
chronister Posted July 16, 2007 Share Posted July 16, 2007 I don't know javascript, but I can help do it in PHP. This is based on the time of the server that is serving your pages. If your server is not in the timezone you want, we will have to offset the time in the $time variables. <?php $now=time(); // get time right now $time1=mktime(0,0,0); // We get the time at 00:00 today $time2=mktime(6,0,0); // we get the time at 06:00 today if($now > $time1 && $now < $time2) // if now is less than 6am and greater than midnight { // put image code here with timed popup code here } else { // put regular image code here without timed popup code } ?> Hope this helps you. Link to comment https://forums.phpfreaks.com/topic/59864-popup-help/#findComment-299596 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.