I really do not understand how to put this 2 codes togheter. I want to mash this to togheter so it works.
Code 1:
<script type="text/javascript">
function myfunction(obj){
if (obj.checked)
{
alert("checked");
/// I want to put code 2 here
}
else
{
alert("Unchecked");
/// I want to put code 2 here
}
}
</script>
Code 2:
<script>
window.setInterval(function() {
httpGetAsync('test.php', function(text) {
if (document.getElementById("text").innerHTML >= 700) {
window.open("www.site.kom", "_blank");
alert("Test 2");
}
});
}, 7000);
</script>