Calculate The Read Time For A Page
Jan 24, 2006
I am trying to track the amount of time a user spends reading a specific webpage
I have decided on using an onClose call to the function called closeTime()
The code on the viewing page is: Code:
View 26 Replies
ADVERTISEMENT
Jul 12, 2011
My requirement: Each time a visitor arrives at a specific webpage i want the main image on the page to be different, or more specifically, one of 6 images which will be shown in rotation. Solution: Set a cookie. Each time the visitor access the page read the cookie and display the corresponding image. Then increment the value and rewrite the cookie, so that next time they'll see the next image in sequence. NB: if the cookie does not exist (first timer) or is at 6, then the value is set to zero (and then incremented).
Problem: Can't get my coding to work. Specifically it just doesn't do anything - no error message, no cookie written. I'm a very novice scripter, as in I've cobbled the coding together from bits off the net that i think i've managed to grasp some kind of an understanding of. Very suck it and see - so far lots of sucking and no seeing!
[Code]...
View 6 Replies
View Related
Feb 4, 2011
I'm using a javascript-based countdown timer that currently uses the client's system time to calculate the countdown. I assume that this line of code is where this is performed:
Code:
I'm trying to make the script use server time instead as some people may have wrong dates/times set or live in different time zones etc.
So what I did was use a bit of php:
PHP Code:
This gives a result but now the countdown is 30 days off. I am testing on my local xampp server (which also uses system time) so there should be no discrepancy. I also tried adding
Code:
But no difference.
I can post the whole script if required but it is reasonably long.
View 9 Replies
View Related
May 9, 2010
I built 2 steps script - in the first page the visitor choose the date he want to schedual his appoitment and his location:
PHP Code:
<select name='zone'>
<option value='-4' selected> USA - EST</option>
<option value='-7'>USA - PST</option>
[code]....
In the second page he need to choose the time he want for his appointment (the time is in GMT+3 -> my local time). in this page the script also get the time zone and the date that he choose in the previous page (using POST - PHP). the date saved in variable. I used unix time (MKTIME function) I want that every time my visitor choose time (from drop-down box) a new cell/DIV will appear with his local time.for example - when he choose date: 10 May 2010, time zone: Austrlia - East Coast (+8 Hours) and time 22:00, New DIV will appear with the date "11 May 2010, 03:00AM" (there are 5 hours different).what is the JS what caculate and show the visitor local time?(I have, in PHP, only his time zone and the date that he coose in the first page)
View 2 Replies
View Related
May 9, 2010
Please can u help? how would i get the total work hours between two times (8:30 to 5:30) from a web form.I tried just minusing one from the orther but it came back with "Nan"
View 2 Replies
View Related
Mar 25, 2009
I have a Javascript that calculates and displays how long, in minutes and seconds a user has been in online(Google Gears development) mode on a given web page. I need however, to modify the script so that it calculates and displays how long the user has been online on the web site. For e.g. on page 1 for 2 minutes 12 seconds. Moves to page 2 - total time on page 1 and 2= 4 minutes 13 seconds. My script (see below) starts a second counter then converts that to minutes and seconds. I have tried passing the secVar0 variable in the url but that comes back "undefined".
Code:
if(request.responseText != "" && request.responseText.indexOf("404 Page not found") == -1)
{
c=0;
[Code]....
View 1 Replies
View Related
Mar 25, 2009
I have a Javascript that calculates and displays how long, in minutes and seconds a user has been in online(Google Gears development) mode on a given web page. I need however, to modify the script so that it calculates and displays how long the user has been online on the web site. For e.g. on page 1 for 2 minutes 12 seconds. Moves to page 2 - total time on page 1 and 2= 4 minutes 13 seconds. My script (see below) starts a second counter then converts that to minutes and seconds. I have tried passing the secVar0 variable in the url but that comes back "undefined".
[Code]...
View 1 Replies
View Related
May 24, 2010
I am trying to populate the javascript and want to return the value to the jsp page.. The function is like this.
function difference(startTime, endTime){
var starttime = document.getElementById(startTime).value;
var endtime = document.getElementById(endTime).value;
[code]....
View 3 Replies
View Related
Feb 23, 2011
I have a problem here. I know how to store a cookie and check a cookie... but i don't know how to calculate the time between current visit and previous visit...
Example.
I logged in @ 1pm and logged in again @ 3pm... It should a msg like "your last visit was 2 hours ago"
View 4 Replies
View Related
Nov 16, 2011
There are two text boxes in a HTML form.The first text box takes the time when the user starts to work on a project. The second box takes the time when the user stops working on that project.Now, I would like to calculate the total time worked on that project for that user. That is (stop time - start time). I tried few things without success.
View 4 Replies
View Related
May 3, 2010
Is any way to calculate the time in hour elapsed between two hours?
View 1 Replies
View Related
Apr 24, 2010
I have a very large tree data structure and I want to display some of its sections on a HTML page. I wrote the following JavaScript that loads parts of the tree dynamically injecting the desired HTML code.
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>[code]....
Each show_xxxxxxxx() function displays desired part of the tree on HTML.The problem is each time I load the HTML file it takes a lot of time to read the JavaScript (there are many show_xxxxxxxx() functions with a lot of HTML to insert).Is it possible to cache the loaded JavaScript into browser memory so it won't read the entire script when I reload the page with different content?
View 3 Replies
View Related
Jun 2, 2010
So I have to display my school timetable, read the current time, and using javascript highlight the current lesson.
My teacher says i must use about 3/4 functions not switch cases.
View 6 Replies
View Related
Jun 25, 2011
I am trying to figure out time functions in PHP. However, I come to know these time and date functions work on the Server. I want to calculate what time a user takes to solve a problem. That means I need to know user's machine's timings. How can that be incorporated? Do I need to use Javascript?
View 7 Replies
View Related
Nov 7, 2005
I use an asp page to display pages, where the dynamic content is in an
iframe. To calculate the height of the iframe I use the calcheight function. However when trying to do this with external pages, I get an access denied error, and the iframe won't display correctly. Is there a way to solve this or another way to calculate the height for the iframe. The relevant code displayed below...
View 1 Replies
View Related
Dec 28, 2006
If you give an element an inline property, as in
<div id='testDiv' style='display:block'>blah</div>
then an alert(document.getElementById('testDiv').style.display) will of course give you "block." But, if you give the element a property through an external CSS file, the same alert comes up empty!
This is causing me big problems as I've discovered and is ridiculous. Can javascript read properties from external CSS sheets?
View 2 Replies
View Related
May 14, 2009
I was wondering if you can extract an item from a rss file and display it in a div. like extract the title and put it in an h3 tag, extract the description and put it in a paragraph, and have the link below, and all automatic, so you just insert the code and it displays the first 10 items or so?
View 9 Replies
View Related
Feb 8, 2010
Basically am going to make an search script to my website. I am going to use onkeyup event when the user is writing and my problem is that I wont to make a function that takes in input from the user and put it in the url. So I need to be able to write and read from the url without refreshing the page. I've managed to do this using window.location.search but I cant get it to work because the page keeps refreshing.
View 1 Replies
View Related
Jan 6, 2010
I'm trying to read the <title> value from a page head. All browsers I've tried are happy with $ 'title'.text apart from ie8 which returns nothing. Am I doing something wrong, or is it IE8 that's wrong? Is there a workaround?
View 4 Replies
View Related
Oct 24, 2005
I have an XML document which lists some information about movies(Title, actor, etc.) I am using Javascript to pull that data and display it as html. Is it possible to create a link for each one of those titles that are pulled from the XML in my JS? Here is my code:
for (var i=0; movies.length > i; i++)
{
var Title = movies[i].getElementsByTagName("title");
var Actor = movies[i].getElementsByTagName("actor");
var Price = movies[i].getElementsByTagName("price");
results += i+1 + '. ' + ' "<span class="title"><a href="http://www.imdb.com">' + Title[0].firstChild.nodeValue + '</a></span>"' +
' starring <span class="actor">' + Actor[0].firstChild.nodeValue + '</span>' + ' and costs approximately $'+ Price[0].firstChild.nodeValue + "<br/>
";
}
document.getElementById("displayresults").innerHTML = results;
View 5 Replies
View Related
Nov 1, 2010
I am working on a simple tool for my office.We have a very huge database with 5000 tables. All the tables, Columns and their attributes are stored in to excel sheet.
Tool I am designing is for mapping between front end and back end values. Now I will use an image (front end screen of our application) , when user clicks it, I need the HTML to access the excel sheet and display the back end field,the name of tables it can be found in and other data related to that field
Simply,I want to pull data from excel and display them differently for each different click. I want to pass the parameter on click and filter a column in excel with it and display the entire set of sheet with this criteria. Is this possible? or am I expecting too much
View 5 Replies
View Related
Feb 2, 2010
I want to find any <!-- --> comment tags in a page and then read the contents. I would also like to distinguish between those in the body and those elsewhere in the HTML document.What do I use to get an array of these elements?
View 10 Replies
View Related
Jun 23, 2009
How can i add a function to all links which share a same class on page read? I want to add this addClassSub(); to all the links with a class name 'sub'.
this is the html,
[Code].....
View 2 Replies
View Related
Aug 18, 2009
Okay I have some page titles that include the symbol and when it fills in the subject, it shows up as:Here's my code:
<script type="text/javascript">
function sendMessage () {
var subj = "LALALA-" + document.title;
[code]....
View 1 Replies
View Related
Oct 17, 2011
when we access a page if it is idle for sometime automatically it should redirect the page automatically .if in btwn mouse on click i done then reset the time again .
View 1 Replies
View Related
Oct 17, 2011
when we access a page if it is idle for sometime automatically it should redirect the page automatically .if in btwn mouse on click i done then reset the time again
here is my code
<html>
<head>
<title>Session Timeout Warning</title>
[Code].....
View 1 Replies
View Related