0
Hello I have this code below that checks if there is an image in the url, if it does not exist. I would like that in the place of Alert that he called a modal informing that this without internet friends someone of this hangman here for friend.
Follow the code below
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script>
$( document ).ready(function() {
function onLine() {
alert("onLine")
}
function offLine() {
alert("offLine")
}
var i = new Image();
i.onload = onLine;
i.onerror = offLine;
i.src = 'http://www.google-analytics.com/__utm.gif';
});
</script>
I need to call the modal in place of the javascript Alert forgot to put the modal div
– Hemerson Prestes
Type this one http://stackoverflow.com/questions/38200910/check-internet-connection-in-angularjs-and-show-popup
– Hemerson Prestes
The problem is that this only comes the modal when disables the computer network
– Hemerson Prestes