This topic is locked
[SOLVED]

 Auto Save In Php Runner

2/18/2013 8:47:53 PM
PHPRunner General questions
R
rlarkinsmith author

I have been trying to find a way, through ajax or js or php etc. to make my phprunner autosave every x number of seconds. I am not a programmer by trade and am definitely one of those that phprunner was made for. I support several schools with special education software, but would love to be able to implement an autosave as some of the fields are quite extensive. Help if you can.

C
cgphp 2/19/2013

What do you want to auto save? Please, describe the context.

admin 2/19/2013

In a very simple form you can make your Save button to be clicked once every few seconds or minutes.

To do so add the following code to Javascript OnLoad event of the Edit page:

setTimeout(function() {

$("#saveButton1").trigger('click');

}, 5000);


I have to add that this will be a terrible usability issue if not done right. Proper implementation need to save data behind the scene and, best of all, in a temporary table/record. Unfortunately there is no 'one size fits all' solution here. It all depends on what your application details and how people use it.

A
Athlon 2/19/2013

This can be done using jquery. I spent a lot of time figuring this out and it works great. Performs an autosave ( in my case every 10 minutes but can be set to anything in the js file )then returns to the box being edited on the same page so you can continue entering data. Works in IE and chrome.
I too work with in a similar field and develop applications for such. Happy to provide you with the files if you want to PM me.
Mike.