Results 1 to 8 of 8

Thread: Ajax for autosave stuff

  1. #1
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Ajax for autosave stuff

    So I've been doing a bit of reading on AJAX and on the most part 'they' seem to be going on about retrieving data from elsewhere, but I'm wondering, could it be used to save a form that's being filled in every, lets say, 5 minutes? (much like the google mail draft thingy)

    This is probably the biggest issue our user base has with our current intranet system as they usually have to fill out long reports. Obviously I've suggested that they manually click the 'submit' button every now and then, but that basically doesn't happen.

    Anyone got any first hand experience of this type of thing? Or maybe something I could read up on?
    Cheers
    -Chris

  2. #2
    NOT Banned
    Join Date
    Jan 2007
    Posts
    5,905
    Thanks
    412
    Thanked
    278 times in 253 posts

    Re: Ajax for autosave stuff

    what do you mean save a form raz? got an example to help me understand?

  3. #3
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: Ajax for autosave stuff

    Sorry, should have been more clear. I meant, saving the contents of a html form as its being filled in by the user (textareas and inputs). Much like the autosave functions in office.

  4. #4
    NOT Banned
    Join Date
    Jan 2007
    Posts
    5,905
    Thanks
    412
    Thanked
    278 times in 253 posts

    Re: Ajax for autosave stuff

    yes thats possible. You could have ajax call a php script to save the contents of each field into a cookie for you. and if needs be it could read the cookie and refill the fields again. is it like incase the user inputs something wrong and submits and when u go back all the fields are empty?

  5. Received thanks from:

    Raz316 (21-02-2008)

  6. #5
    Flower Child stytagm's Avatar
    Join Date
    Aug 2004
    Location
    London
    Posts
    754
    Thanks
    47
    Thanked
    23 times in 18 posts

    Re: Ajax for autosave stuff

    Are you basically trying to keep the session alive too? (Squirrel mail can be guilty of this, if you spend more than 20 mins writing an email, your session has expired, so when you hit send, it's canned

    So javascript to simply keep the session alive would be half way there. Ajax to save the half written email would be even better. Good idea.

    Does Jquery have anything useful that might help you?
    They told me I was gullible ... and I believed them.

  7. Received thanks from:

    moogle (21-02-2008),Raz316 (21-02-2008)

  8. #6
    Funking Prink! Raz316's Avatar
    Join Date
    Jul 2003
    Location
    Deal, Kent, UK
    Posts
    2,978
    Thanks
    130
    Thanked
    62 times in 52 posts

    Re: Ajax for autosave stuff

    cheers you two, I think the issues various people have been having is with the session timing out. So something that prods the session while they are working would be good.

    As for the storing of data within a cookie I've just been mucking around with a greasemonkey script that claims to do this and while it currently doesnt work the whole time, it does seem like it could do the job too!

  9. #7
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: Ajax for autosave stuff

    Generally speaking you don't want to store too much data in a cookie.

    What language is the app your using written in?

    Doing something like this in Ruby on Rails, or MonoRail or MS MVC is a peice of p*ss.

    (heck even in WebForms its easy).
    throw new ArgumentException (String, String, Exception)

  10. #8
    NOT Banned
    Join Date
    Jan 2007
    Posts
    5,905
    Thanks
    412
    Thanked
    278 times in 253 posts

    Re: Ajax for autosave stuff

    no problems raz.

    thanks for that jquery stuff stytagm it's very interesting.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. WHSmith Clearance and old stuff
    By faisal_uk in forum Retail Therapy and Bargains
    Replies: 4
    Last Post: 11-06-2004, 12:04 AM
  2. New Stuff Coming Thoughts And Help Please
    By bigjonnyauk in forum PC Hardware and Components
    Replies: 5
    Last Post: 12-05-2004, 12:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •