I wasn't sure where to post this or if anyone would actually be able to help but here goes anyway....
basically, ive made a web app which is just a glorified web form - user fills in the fields then presses the submit button, the data is then passed to a web server for processing in the appropriate manner. The problem i have is that some times when i try to submit the form i may be out of signal but the app 'submits' anyway. The data then doesn't get passed to the web server.
What i would like if possible is:
a) Check for a data connection before submitting the form.
b) Store the data locally (iphone) for re-submit later on when in signal.
Could anyone suggest any ways of going about doing these 2 things please?
Thanks in advance.
Just to deviate slightly, with a native app you would listen for a success response when you post something to the server - so the server talks to the app; if there is no server response then you know the server is unavailable. You wouldn't just check for a data connection to be live as that can be unreliable; you need a success response.
You need to check that the transfer can and has been made. Remember if someone is on the move they could have a connection but it could be so poor that it is unreliable. In which case it might make sense to store the data.
With saving the data, with native apps and web apps you can access local storage; using HTML 5: http://paperkilledrock.com/2010/05/html5-localstorage-part-one/
Thanks again for the help tho.