im working on a phonegap
application i want to test if theres a connection internet display an iframe, else display a message "please check your internet connection".
i used a javascript code, it works for me on the navigator, but when i build the application it didn't work for me, my code is like this:
<div id="app"></div>
<script type="text/javascript">
var online = navigator.onLine;
if (online == true) {
$( "div#app" ).html("<iframe src='#' frameborder=0 width=100%></iframe>");
} else {
$( "div#app" ).html('NO INTERNET CONNEXION');
}
</script>