Skip to content

Instantly share code, notes, and snippets.

@mikaturk
Created October 29, 2014 14:49
Show Gist options
  • Save mikaturk/9de02bc8eb5830618801 to your computer and use it in GitHub Desktop.
Save mikaturk/9de02bc8eb5830618801 to your computer and use it in GitHub Desktop.
dagrooster iframe app
<html>
<head>
<script>
//script for getting the week number
lln = "8605"
naam = "Mika Turk"
print = function () {}
Date.prototype.getWeek = function() {
var onejan = new Date(this.getFullYear(), 0, 1);
return Math.ceil((((this - onejan) / 86400000) + onejan.getDay() + 1) / 7);
}
var weekNumber = (new Date()).getWeek();
function reload() {
document.getElementById('iframe').src = "http://dagrooster.northgonet.nl/infoweb/print.php?&week=" + weekNumber + "&naam=" + naam + "&id=" + lln +"&type=0"
}
window.setTimeout(function(){reload()}, 100)
//window.setInterval(function(){document.getElementById('body').onload = ""}, 1)
</script>
</head>
<body>
<iframe id="iframe" height=600 width=700></iframe>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment