Thanks,
I got it working yesterday using a image.

JT

  -----Original Message-----
  From: Pascal Peters [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 31, 2004 2:11 AM
  To: CF-Talk
  Subject: RE: How do I track

  You are mixing _javascript_ (client side) and CF (server side) here. This
  simply won't work.

  On your original question. This is a hard thing to do. Why do you need
  it? What do you mean by "How long someone has viewed a coldfusion page"?
  Start when it loads in the browser? What is defined by page?

  If you really need to do this, I would create a JS function to calculate
  this: initialize the time in onload and calculate the difference in
  onunload of the body. Then send a request through a popup or hidden
  frame (or even an img src) to the server.

  Pascal

  > -----Original Message-----
  > From: JT [mailto:[EMAIL PROTECTED]
  > Sent: zondag 30 mei 2004 20:57
  > To: CF-Talk
  > Subject: RE: How do I track
  >
  > Hum...
  >
  > Why does this not work?
  >
  > <cfset session.timeFirstView = Now()>
  >
  > <cfscript>
  >
  > pagetime = structnew() ==> CF
  >
  > pagetime.FirstView = session.firstTimeView ==> CF
  >
  > pagetime. ExitTime = onunload(now()) ==> CF & JS
  >
  > pagetime.Visited = pagetime.Visited - pagetime.Firstview ==> CF
  >
  > alert(time.Visited) ==> JS
  >
  > </cfscript>
  >
  > Any help preciated,
  >
  > JT
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to