Commit 1f707a04 authored by Antek Grzanka's avatar Antek Grzanka

Add basic XHR request.

parent 2adc9072
hej hej hej
\ No newline at end of file
<div id="widget">
loading...
</div>
<script>
document.addEventListener('DOMContentLoaded', function(){
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
document.getElementById('widget').innerHTML = xhr.responseHtml;
}
}
xhr.open('GET', 'http://smog.telemabk.pl/view', true);
xhr.send(null);
});
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment