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

 

Link to comment
Share on other sites

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>

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.