You can read descriptions of this below, but here it is...
1) create an application variable containing two elements.
a) Page being edited (cgi.script_name)
b) Person that is making the edit.
2) set the application variable to timeout at about 10 minutes.
> We want to prevent person A spending 30 minututes making
> changes, person B comes in, makes a single change (and waits),
> after person A saves, person B saves (and all changes that were
> made by person A are now lost).
Two things you can do here..
1) create an application array that holds the list of pages that are
currently being edited... Hmmm... you might need an application variable
for each page instead. (see second set of comments for the next problem).
I think each application variable will also need a "by whom" identifier so
it can restrict edit to one person.
2) create a datasource with a list of all the pages that can be edited and
place a yes/no type field in there that says when it is locked.
>
> The problem is on how to release the "lock" on a page,
> if the user just closes the browser (or loses the connection
> to the site) we cannot unrelease the "lock" when they
> have finished since we cannot identify when a
> user has left.
you can set the application variable's timeout to a small number, say 10
minutes. If the page is re-requested by the same user, then the timer gets
reset for another 10 minutes. If not, it times out, releasing the lock.
>
> We don't want something cumbersome like a javascript popup
> asking the user 'Are you still editing?' every 5 minutes or
> so (and unlocking if there is no response etc).
>
> We could use a image pipe (from the browser to the server) to
> use javascript to inform the server every minute or so
> ("I am still alive") and if this pipe is lost (ie the client does
> not make any request to the server) the server will know
> (via schedule etc) that its been >1 minute since the last
> request was made and release the lock - are there
> any disadvantages to this method?
>
> Bimal Shah
> Senior Web developer | Venus Internet Ltd | www.venus.co.uk
> e: [EMAIL PROTECTED] | t: 0207 240 5858 | f: 0207 240 5859
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists