>- see footer for list info -< One word !!!! 'Hero'
Thanks Duncan. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Duncan Cumming Sent: 03 January 2005 12:30 To: [email protected] Subject: RE: [CF-Dev] saving a form prior to session timeout >- see footer for list info -< Let's assume your Session timeout is 30 minutes, i.e. 1800000 milliseconds. In the head of your page, stick this code: <script language="Javascript" type="text/javascript"> <!-- var pageTimer = setTimeout('sessionEnds()', 1799900); // set timeout value something slightly less than your session timeout. i.e the session is still active. function sessionEnds() { document.whatever.submissionType.value = 'Expired'; document.whatever.submit(); } //--> Then the form body could be: <form name="whatever" action="page.cfm" method="POST"> <!--- your form fields here ---> <input type="hidden" name="submissionType" value="Normal"> <input type="submit"> </form> And in your action page, do something based on the value of submissionType, either store that value itself, or set a boolean flag. Then when the user logs in again, query to see if they have a recent incomplete form, redirect to the form page, and populate the fields with the values stored. It would also be a good idea, when submitting the form automatically, to display a suitable message to the user. Of course, the problem is that once you submit the page, the session is no longer expired, but you could automatically log them out instead. Even better would be to store these values, then redirect back to the form page, populating the data again. Keeps them logged in indefinitely... Duncan Cumming New Media Developer 700 4105 / 01592 414105 >>> [EMAIL PROTECTED] 03/01/2005 11:56:07 >>> >- see footer for list info -< cheers Duncan, That's uncanny, I had the same thought a few days after I sent the message but unfortunately my JavaScript is no where near my CF skills, any pointers on the code required? Regards, Lee -----Original Message----- From: Duncan Cumming [mailto:[EMAIL PROTECTED] Sent: 03 January 2005 09:53 To: [EMAIL PROTECTED] Subject: Re: [CF-Dev] saving a form prior to session timeout another method could be to use Javascript to keep an eye on the timeout. i.e. start a timer when the page loads, and when it is almost at the session timeout value, do document.formname.submit(), but also pass in another field to indicate that the session expired. store the values in your db, either as normal but with a flag to indicate that it was expired, or in a temp table. Duncan Cumming New Media Developer 700 4105 / 01592 414105 >>> "lee" <[EMAIL PROTECTED]> 22/12/2004 17:21:52 >>> >- see footer for list info -< Dear All, Is anyone aware of whether it is possible to have someone filling in a form on a website when for one reason or another (i.e. the phone rings or something else) they are distracted from the completion and submission of the form, is it possible to in some way save the contents of the form and autotically return the user to the form when they log back in again? Also, can anyone recommend a good volume testing tool for putting a website through its paces? I know it is almost xmas and people are looking forward to the break but if anyone has any ideas it would be a massive help to a project I have been given. Regards, Lee _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed and should not be disclosed to any other party. If you have received this email in error please notify your system manager and the sender of this message. This email message has been swept for the presence of computer viruses but no guarantee is given that this e-mail message and any attachments are free from viruses. Fife Council Tel: +44 (0) 1592 414141 ********************************************************************** _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >-< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
