Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:49:03+00:00 2026-05-27T03:49:03+00:00

Well, i was trying to reach a solution and i thought this might work:

  • 0

Well, i was trying to reach a solution and i thought this might work:

On the PHP file:

$liguem = getdate();

$liguemoff = $_COOKIE['liguemoff'];
$liguemon = $_COOKIE['liguemon'];

if(empty($liguemoff)){
    setcookie('liguemoff',$liguem[0],time() + (50000));
}

setcookie('liguemon',$liguem[0],time() + (20000));



$body->assign("COOKIE2", $liguemoff);
$body->assign("COOKIE3", $liguemon);

This has some body assign because I’m working with XTemplate, but the PHP is just PHP.

Now on the index file, some JavaScript:

var cookie2 = {COOKIE2};
var cookie3 = {COOKIE3};

if( cookie3-cookie2 > 60){
    alert('alerta');
};

Truth is that it works! People might not be navigating, but it is what i want, the pop up will only open after the visitor sees at least 2 pages (Server-side thing).

The main problem is, that i CAN’T make the function popup(); to trigger where i have the ALERT displaying. The ALERT is working alright though…. Any hints?

PS:

This is the popthat(); function:

function popthat(){
    $("#darkside").css('opacity','0.3').fadeIn('slow');
    $("#darkside").click(function () { 
    $(this).css('opacity','1').fadeIn('fast');
    $("#liguem").hide();
    });
        $("#liguem").corner();
    $("#liguem").hide();
    $("#liguem").delay(200).css('visibility','visible');
    $("#liguem").fadeIn('fast');
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:49:03+00:00Added an answer on May 27, 2026 at 3:49 am

    You can set a timeout to display your popup after a specified amount of time. This amount of time can be dicated by your PHP since the server-side code will be able to track the amount of time on the site through page-views. This way the popup can display after 60 seconds on the site even if the user is not navigating to another page.

    Something like:

    setTimeout(popthat, <?php echo $_COOKIE[...]; ?>);
    

    Your PHP would echo the number of milliseconds until the popup should display.

    A note: when you replace your alert() with the popthat() function the DOM may not be ready and popthat() won’t be able to work because it won’t find any elements that match your selectors. Try running your code on document.ready ($(function() {});).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi guys thanks for pay attention to this. Well im trying to replace every
Alright well I am trying to create a dictionary from a text file so
hey well I'm trying to change the url structure using the htaccess file and
well, I am trying to include a header file in my project, while the
Well, I was trying to fix this program, and I keep getting the errors
well I'm trying to configure the project with Ant and this is what I
Well im trying to encrypt an string in objective c extending NSData with this
Well im trying to write my own custom control extender but i can't get
well iam trying to get version of IE used by user by using $.browser.version
Well,I am trying to do something similar what I did in Adobe Flex.Consuming a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.