Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Handling Large Forms

Reply
Thread Tools

Handling Large Forms

 
 
supremeoppressor@gmail.com
Guest
Posts: n/a
 
      02-01-2007
I am looking for a script or method of storing the data a user inputs
in our surveys (forms with 50-100 questions) in a cookie and then if
the user has to leave they can come back and the answers will
automatically be repopulated.

Currently this is a cumbersome process as I have to assign a value to
each form element, I was hoping to get something that would do it
automatically so I can apply it to all of the forms.

Thanks.

 
Reply With Quote
 
 
 
 
Daz
Guest
Posts: n/a
 
      02-01-2007
On Feb 1, 7:32 pm, (E-Mail Removed) wrote:
> I am looking for a script or method of storing the data a user inputs
> in our surveys (forms with 50-100 questions) in a cookie and then if
> the user has to leave they can come back and the answers will
> automatically be repopulated.
>
> Currently this is a cumbersome process as I have to assign a value to
> each form element, I was hoping to get something that would do it
> automatically so I can apply it to all of the forms.
>
> Thanks.



Hi.

I would suggest taking a different route, and using server-side
technology to store the information. If I remember correctly, cookies
are limited to about 4KB in size, each, and you usually won't see an
error when you exceed this limit. Also, I believe this limit varies
from browser to browser. Generall, most browsers only allow up to 300
cookies to be in storage at any one time. If the user clears their
cookies in the meantime, or happens to visit 300 fresh sites before
going back to yours, the information will be lost. Also, the
information stored in the cookies will be sent to your site with each
user retreives a page from your website. For users on dial-up, sending
4KB of cookies will take a very long time indeed.

The only other options you really have, would be to use a session (if
your server supports PHP). This relies on a cookie, and unless changed
from the default only keeps a stored session for 24 hours. Also, you
can use a database, but this would again rely on the user not having
deleted their cookie for your site, and it would be down to you to
manage when data is removed from the database, and how long it's kept
for.

If you used a database, you could easily link information to a user's
IP address. The catch here is that there can be more than one user on
a particular IP address, and also, this poses problems for users using
proxies. I think the best way to store user specific information, is
to use a website login. Not always convenient, but a darn sight more
reliable and secure.

Just my two cents.

Daz.

 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      02-01-2007
On Feb 1, 10:32 pm, (E-Mail Removed) wrote:
> I am looking for a script or method of storing the data a user inputs
> in our surveys (forms with 50-100 questions) in a cookie and then if
> the user has to leave they can come back and the answers will
> automatically be repopulated.
>
> Currently this is a cumbersome process as I have to assign a value to
> each form element, I was hoping to get something that would do it
> automatically so I can apply it to all of the forms.


That is not a code to use, just a FYI of the coming way to do it:

<http://msdn.microsoft.com/library/de...rkshop/author/
behaviors/reference/behaviors/userdata.asp>

<http://developer.mozilla.org/en/docs/Session_restore_API>

<http://groups.google.com/group/comp....avascript/msg/
1536638f3531b242> as a history note - the MDC article was re-written
rather radically since then.

 
Reply With Quote
 
supremeoppressor@gmail.com
Guest
Posts: n/a
 
      02-01-2007
Thanks for the info, I guess its not so much the process of storing
the data as it is recalling and populating the form.

Right now I have something like:

<input type=text name=question1 value="$_cookie[question1]">

so for each question i have to put a value in. I am trying to
eliminate that step so i can just write:

<input type=text name=question1> and have a JS script pop the correct
value into the form for me.



On Feb 1, 2:13 pm, "VK" <(E-Mail Removed)> wrote:
> On Feb 1, 10:32 pm, (E-Mail Removed) wrote:
>
> > I am looking for a script or method of storing the data a user inputs
> > in our surveys (forms with 50-100 questions) in a cookie and then if
> > the user has to leave they can come back and the answers will
> > automatically be repopulated.

>
> > Currently this is a cumbersome process as I have to assign a value to
> > each form element, I was hoping to get something that would do it
> > automatically so I can apply it to all of the forms.

>
> That is not a code to use, just a FYI of the coming way to do it:
>
> <http://msdn.microsoft.com/library/de...rkshop/author/
> behaviors/reference/behaviors/userdata.asp>
>
> <http://developer.mozilla.org/en/docs/Session_restore_API>
>
> <http://groups.google.com/group/comp....avascript/msg/
> 1536638f3531b242> as a history note - the MDC article was re-written
> rather radically since then.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
median of large data set (from large file) friend.05@gmail.com Perl Misc 5 04-02-2009 04:06 AM
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
[Urgent] Is there a size limit on returning a large dataset or a large typed array from web service? Ketchup ASP .Net Web Services 1 05-25-2004 10:11 AM
Backing Up Large Files..Or A Large Amount Of Files Scott D. Weber For Unuathorized Thoughts Inc. Computer Support 1 09-19-2003 07:28 PM
Handling large file upload Thomas Due ASP .Net 6 08-20-2003 12:06 PM



Advertisments