Welcome to WebmasterWorld Guest from 3.80.4.76

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Take attendance offline

Save until there is a connection

     
6:46 pm on Oct 23, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 28, 2001
posts:1380
votes: 0


I have a customer that doesn't always have a solid internet connection. They are using our PHP app to take attendance. Basically, they just toggle a switch to say present or absent, and with ajax we update the database on the web server. What do you think the simplest way would be to let her take roll for 3-4 classes while offline, and then refresh the server db once she is back online. Any ideas?
6:53 pm on Oct 23, 2014 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:5027
votes: 57


Not entirely sure what you mean, though it sounds like localstorage and some javascript would be useful.

When they check back in you can check if data is in sync or if there's anything new in localstorage for you to look at.
8:19 pm on Oct 23, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 28, 2001
posts:1380
votes: 0


So normally we use a web page, and not sure what to do to temporarily store data from the app locally. I'll look for "localstorage" and see what comes up in a search.
11:24 pm on Oct 23, 2014 (gmt 0)

Senior Member

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2006
posts: 3147
votes: 3


I think along the lines of what brotherhood of LAN suggests.

I'm just curious what you currently do when your "ajax request to update the database on the web server" fails?

A. Fail silently
B. Fail with a big error message
C. Place a discrete warning notice somewhere on the page, queue the failed request and try again in a short while.

The "queue" could simply be in memory, or localstorage (or even a cookie) to make it a bit more permanent.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members