Jump to content

[SOLVED] NEED code that will check the time the user spends on the webpage.


andz

Recommended Posts

Place the following script between the <HEAD> and </HEAD> tags:


<script language="javascript">
<!-- begin

function TimedPop() {
url = "URL/to/popup.html";
width = 320; // width of window in pixels
height = 390; // height of window in pixels
delay = 60; // time in seconds before popup opens
timer = setTimeout("popup(url, width, height)", delay*1000);
}

// end -->
</script>

Add the following code into your <BODY> tag:

onLoad="TimedPop()"

Your <BODY> tag should then look something like this:

<BODY onload="TimedPop()" bgcolor="#ffffff" text"#000000">

 

this was found in a matter of seconds using google search,http://www.nowsell.com/pop-ups/pop-up-scripts.html

 

hope it helps

 

i just tried this and it worked for me

 

<script language="javascript">
<!-- begin

function TimedPop() {
url = "http://yoursite.co.uk/popup/wherever.html";
width = 320; // width of window in pixels
height = 390; // height of window in pixels
delay = 5; // time in seconds before popup opens
timer = setTimeout("window.open(url, width, height)", delay*1000);
}

// end -->
</script>

</head>

<BODY onload="TimedPop()" bgcolor="#ffffff" text"#000000">


some text or other 

</body>

is there a way that this script will only work if the user is not login? so if the user is already logged in, this script will not be activated, if the user is not login, the popup script will activate.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.