Autosaving textarea with AJAX

16 May 2005   3 comments   Zope

Powered by Fusion×

I'm very excited about a new feature that I've been developing for the IssueTrackerProduct recently. The idea has been in my head for a long time, especially as I hear people complain about their browsers/computers crashing on them thus loosing the issues or followups they're about to add. The first step was to develop the "Save Draft" feature which makes it possible to save an issue as you're about to submit it and return any other day and complete it; just like most serious webmail sites have like Gmail.

Now, the autosave feature is basically a Javascript that gets triggered periodically but a timer. What this then does is that it pretends to submit the current form as it is into the Save Draft feature (with the exception of being flagged as an autosave on the draft). The cool thing about this is that if you don't have Javascript enabled on your browser or you're using an ancient browser, nothing happens. Nothing bad. Nothing good. You'll just have to live without the autosave feature.

The user doesn't see or notice anything, except when they decide to go back to the issue tracker after they have restarted their crashed browser/computer. Then, when the user clicks back on "Add Issue" they see a list of all saved drafts and those that have been saved automatically are denoted with (autosave).

I've set this up now for testing on this Autosaving Issue Tracker

The periodicity that is set at the moment is 8 seconds. This might change. The shorter the better because potentially less data is lost, but if the interval is too short it causes too much traffic on the server. Bare in mind that this traffic is much smaller in terms of bytes because it just sends the form stuff, not the header or any other crap. I will have a think about the periodicty and maybe make it settable in the properties so that people with poor bandwidth can increase the interval to save bandwidth.

The next step is to gather some feedback about this from real users and then develop it for the followup forms too.

Opera users, there seems to be a bug with Opera that causes a Javascript alert with some blather. This will disappear before the next release. You can read about this on the announcement

UPDATE: It will of course still not work for Opera 7 users but now they don't get the warning message at least.


ozgur gunes
my question is about . i am using ajax but i can not take and write textarea
try to test with my form .. text area
it still have bug.
But from your code, it's good.

how can I work with ajax?
I only new one. can you help me please?
last night I cannot post the (ajax script and) second form to insert after the first form

Now I try ..

Your email will never ever be published

Related posts

Previous: calls it Issue Tracker 14 May 2005
MOBi phonebook into Excel 19 May 2005
Related by keywords:
Now I have a Gmail account 29 June 2004
Gmail account giveaway 09 February 2005
Lazy loading below the fold 26 October 2013
File attachment widget with Javascript 25 February 2005
Changing the size of a textarea box 18 August 2004
mailto: considered stupid, especially with ?subject 25 April 2009
Gmail tip: Searching only for attachments 25 November 2010
AJAX accelerated web widgets 23 June 2005
Gmail spam filter 13 January 2005
Gmail shortcuts 26 April 2005
IssueTrackerProduct featured on 26 January 2006
IssueTrackerProduct 0.6.8 release 20 May 2005