Welcome Guest, Not a member yet? Register   Sign In
how to Autosave
#1

[eluser]basty_dread[/eluser]
How could i implement autosave in codeigniter?
Can anyone help me pls..

i want my program to autosave every 1 minute..
is there an easy way for this?

Thank you for helping.
#2

[eluser]basty_dread[/eluser]
Oh i think i got it.. how can i delete this topic?
#3

[eluser]saidai jagan[/eluser]
How will u auto save ?
ccan u pls giv u r Ideas ?
#4

[eluser]basty_dread[/eluser]
the code that i used is just a javascript.. that every 1 minute it submit the page..

this is by getting the id of the form and then with this:
jscritp::
Code:
function activateautosave(){
    setTimeout ( "savecontent()", 60000 );
}
function savecontent(){
    document.getElementById('frmkeywords').submit()
}

//body
<body>

if you have any idea pls. share.. i really like to learn the autosave in ajax.. thanks
#5

[eluser]Tom Schlick[/eluser]
if you use jquery you can use your savecontent() function just as you are but use the $.post function described here http://docs.jquery.com/Ajax/jQuery.post#...llbacktype
#6

[eluser]Rahul Anand[/eluser]
Yes you are using the right way but It will refresh the page every time. Use Ajax for this. Call the ajax function after 1 mins in loop pass the data to the ajax file and save it. is not it better???? what you think. It will save you time and also the user can work on the same file without getting worry about automatic page submittion. because he/she has to type in 1 min after one min it will get refresh and it will disturb the user either the data is still present in the textbox's . Try it bro !!!!!

Thanks
Rahul
#7

[eluser]basty_dread[/eluser]
Hi rahul..
you are right i think its a lot better.. can you give me a simple code or simple example of how to do that.. Many Thanks..

sad to say, i dont know how to use ajax..
Thanks.
#8

[eluser]Tom Schlick[/eluser]
[quote author="Rahul Anand" date="1262284995"]Yes you are using the right way but It will refresh the page every time. Use Ajax for this. Call the ajax function after 1 mins in loop pass the data to the ajax file and save it. is not it better???? what you think. It will save you time and also the user can work on the same file without getting worry about automatic page submittion. because he/she has to type in 1 min after one min it will get refresh and it will disturb the user either the data is still present in the textbox's . Try it bro !!!!!

Thanks
Rahul[/quote]

hence why i posted a link to the jquery ajax documentation...
#9

[eluser]Rahul Anand[/eluser]
Hi,
please visit http://www.w3schools.com to learn ajax. Its easy and you can learn it easily. if face any problem feel free to contact me at [email protected] or we can chat abou this.


Thanks
Rahul




Theme © iAndrew 2016 - Forum software by © MyBB