I would say, since it is a client end timer, you need to do it in
Javascript first, then CF on the server side to make sure they didn't
bypass the timer by having javascript disabled.

you can use the javascript setTimeout method to execute the alert,
warning, and redirect after a specific period of time once the page
loads.

Otherwise you can just the coldfusion DateDiff  function to compare
the time of posting with the initial base time to make sure they
didn't take too long from the base time to the posting time.

for instance, <cfif DateDiff("n",posttime,basetime) LTE 30> will
compare posttime to basetime in minutes.. if posttime takes 30 minutes
or less after the base time then the CFIF will pass and the post could
be written.




Hope that helps

On 10/18/05, Ken <[EMAIL PROTECTED]> wrote:
> Hi. I am  working on a forum application. There is a fixed time to respond
> to each posting. I want the user responding to a posting to get an alert,
> even if he is typing at the last minute, saying: "Sorry, this posting has
> reached its expiration time, you are being taken to the home page now."
>  There's a db field that holds the expiration time for each posting. That's
> what we will compare the current time to. Or maybe start a timer as soon as
> the user comes to the page, and display an alert at the end of the timer.
> Any ideas how to do this in CF? Code examples will help.
>
>  Thanks,
>  Ken
> ----------------------------------------------------------
>  You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
>
>  CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com).
>
>  CFCDev is supported by New Atlanta, makers of BlueDragon
>  http://www.newatlanta.com/products/bluedragon/index.cfm
>
>  An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]


--
[EMAIL PROTECTED]
http://blog.rawlinson.us

If you want Gmail - just ask.


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to