473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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/tutoria.../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/
May 15 '07 #1
2 2050
On May 15, 5:47 pm, John Murtari <jmurt...@thebook.comwrote:
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 athttp://www.howtocreate.co.uk/tutorials/jsexamples/saveForm.htmlit
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/
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.

May 15 '07 #2
ASM
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 déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
May 15 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bill H | last post by:
I'm really new to Internet apps and such sorry, if this is a "duh" question. What is the standard approach to saving input from a form if on submit the database connection fails? I'm thinking...
2
by: jason | last post by:
Is it possible to POST a FORM to multiple URLS at the same time....OR.... Is the only workaround for this scenario to use response.redirect in the called ASP page and do a multi processing? -...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
1
by: Randell D. | last post by:
HELP! I am determined to stick with this... I'm getting there... for those who haven't read my earlier posts, I'm createing what should be a simple function that I can call to check that...
5
by: ken | last post by:
I have a XML file as below ---------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" standalone="yes"?> ...
2
by: Paul K | last post by:
I have the user selecting a record on one page of the web app I'm working on. After they select a record, I save the record into a session variable and submit the main page (in another window). In...
6
by: drec | last post by:
I am just learning Javascript and I would like to create a basic form that gives me two options. This will be using either checkbox or radio input type, however I would like the second option to...
1
by: Muchach | last post by:
Hello, Ok so what I've got going on is a form that is populated by pulling info from database then using php do{} to create elements in form. I have a text box in each table row for the user to...
5
by: plumba | last post by:
Hi all I have a form (see below), which for some reason has decided to stop functioning all together. It just does not call up the function. It is called up in the opening <form> tag but...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.