Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
lamhotsimamora1993 committed Dec 29, 2017
1 parent 7dbff55 commit 767ea73
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 3 deletions.
3 changes: 2 additions & 1 deletion JS/GF-1.js

Large diffs are not rendered by default.

31 changes: 29 additions & 2 deletions code/part-thirteen.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
<div class="container">
<hr>

For checking internet real time</br></br>
<code>

function realTimeInternet()</br>
{</br>
_checkInternet({</br>
connect:function(){</br>
alert("Connected",false);</br>
}</br>
,</br>
disconnected:function(){</br>
alert("Disconnected");</br>
}</br>
});</br>
}</br>
</br>
setInterval(function(){</br>
realTimeInternet();</br>
},2000);

</code>
</br></br>
<button class="button is-success" onclick="_refresh('./internet-check.html')">TEST</button>
</br>
</br>
<center> <button class="button is-default" id="btn_scroll_down">Go Down</button></center>
<hr> For select text
</br>
<code>
_selectText("my_text");
</code>
_selectText("my_text");
</code>
</br>
</br>
<textarea id="my_text" class="input is-success">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </textarea>
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ <h2 class="subtitle">
}

});


</script>
</body>
</html>
44 changes: 44 additions & 0 deletions internet-check.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Internet Check Real Time</title>
<script type="text/javascript" src="./JS/GF-1.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>

<div>
<hr>
<gf id="disp_result">

</gf>
<hr>

</div>

</body>


<script type="text/javascript">
function realTimeInternet()
{
_checkInternet({
connect:function(){
_printTo("disp_result","<strong style='color:green'>Connected</strong>",false);
}
,
disconnected:function(){
_printTo("disp_result","<strong style='color:red'>Disconnected</strong>");
}
});
}

setInterval(function(){
realTimeInternet();
},2000);

</script>


</html>

0 comments on commit 767ea73

Please sign in to comment.