Jump to content

Popup Help :(


Recommended Posts

hello...

 

because i have no real clue of coding and some guys here can help me, i wanted to ask you something  ;D

 

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.