marieall
Posts: 0
Joined: Thu Oct 03, 2013 4:10 pm

How to create a pop up window which appears only if no internet connection

Hi,

Only one section of my app requires internet.
I want to warn people who runs the app without internet connection, when they try to get into that section, that it won't work., or that they need internet..

Is there a js script I could put on the concerned page load that would solve this?

Thanks!

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to create a pop up window which appears only if no internet connection

PhoneGap has API to check if there is Internet connection: http://docs.phonegap.com/en/3.3.0/cor...

marieall
Posts: 0
Joined: Thu Oct 03, 2013 4:10 pm

How to create a pop up window which appears only if no internet connection

Hi Max,

I'm really lost in how to do so, and I'm not sure it's exactly what I 'm looking for.
I just want that when the user get into the section "airport", the app detects if he has or not internet, and if he has not internet, that a pop up windows opens and let him know he won't be able to access this section unless he gets an access to the wifi.

You see what I mean?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to create a pop up window which appears only if no internet connection

The PhoneGap API link that I posted above allows you to check if there is internet connection or not. You would determine if there is internet connection and then open the popup window.

marieall
Posts: 0
Joined: Thu Oct 03, 2013 4:10 pm

How to create a pop up window which appears only if no internet connection

Thanks, but I just told you I don't know how to proceed... i don't understant what they are talking about.. so it doesn't really help what you are saying :)
Anyway, I found a way to do it with javascript. I tested and it works fine.

Ideally in fact, I would like my database to be accessible offline, so my whole app would be accessible offline. Is there a way to put my database offline? ( I used appery database service)

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

How to create a pop up window which appears only if no internet connection

We understand and we are able to give you guidance and direction but we can't implement this logic for you. It's not part of our support (http://docs.appery.io/support-policy/).

Appery.io database is a cloud database (you can't use it if the app is offline).

There are browser-based databases such as SQLite or IndexedDB that you can store data when the app is offline.

Return to “Issues”