Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

Saving form values on submit in case of failure


Folks,

We are working on upgrading a web based application that allows the
user to type quite a long essay and then submit it to the web site for
processing. Occasionally, the user will lose their session/connection
to the web site/internet -- so after typing for 'hours', they hit
submit and end up back at the login page and often times lose all
their typing.

Javascript seemed like a good tool to use at the user end of the
connection -- they hit submit and we 'save' a local copy of the form
contents and give them an easy way to retrieve it if a session is
lost.

Found a nice approach and a great tutorial using cookies at
http://www.howtocreate.co.uk/tutorials/jsexamples/saveForm.html it
also supports periodic background saves before submit.

The only problem is a 4K limit on data we can save. We had
considered an AJAX type approach and periodically save data to
the web server, but that may be more work/complexity than it is
worth.  I'd welcome any thoughts/recommendations.

--
                                          John
___________________________________________________________________
John Murtari                              Software Workshop Inc.
jmurtari@following domain 315.635-1968(x-211)  "TheBook.Com" (TM)
http://thebook.com/

On May 15, 5:47 pm, John Murtari <jmurt@thebook.com> wrote:

you get more using flash LSOs
but saving using ajax, would be pretty easy and worth the effort. Save
as draft as in gmail shouldnt lock things up and you could offer a
button, either way (auto or manual) the errr would come back a lot
quicker and the user could take their own steps to save what they'd
done. So you could at least warn them of any issues, even if you do a
"null" has session gone post.
John Murtari a crit :

> Folks,

> We are working on upgrading a web based application that allows the
> user to type quite a long essay and then submit it to the web site for
> processing. Occasionally, the user will lose their session/connection
> to the web site/internet -- so after typing for 'hours', they hit
> submit and end up back at the login page and often times lose all
> their typing.

cannot JS alert him ?
cannot JS submit for him during he's typing ?
cannot the asp temporarily save the "essay" in its state while the
checkbox "end" is not checked ?
(and of course automatic saves fire before end of session, that would
have to keep the session the necessary time spent to write)

> We had
> considered an AJAX type approach and periodically save data to
> the web server, but that may be more work/complexity than it is
> worth.  I'd welcome any thoughts/recommendations.

Is it really complex to save some datas ?
(and overwrite on them)

So limit the space to write at 4ko, the user will have to submit his 1st
page before to begin a new one.

Or send from time to time, an Ajax call (to an empty file ?) only to
re-active the session.
Maybe it could be done in 'normal' JS using an hidden object or iframe.
The user will have to save his work locally how he would do with any
application.

--
Stephane Moriaux et son (moins) vieux Mac dj dpass
Stephane Moriaux and his (less) old Mac already out of date

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc