Created
August 24, 2016 09:10
-
-
Save john77eipe/dc50b00ce59d15e4108ea2430dc1ecd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body> | |
<h3>Climate Temperature Toolbox</h3> | |
<input type="button" value="start" id="start" /> | |
<input type="button" value="stop" id="stop" /> | |
Send Weather Data for your home city: | |
<br /><br /> | |
City: <input type="text" id="home-city" /> | |
Celsius: <input type="text" id="home-temperature" /> | |
<input type="button" value="send" id="send" /> | |
<br /> | |
Weather Data from other cities: | |
<ul id="cities"> | |
</ul> | |
<script> | |
//self executing function here | |
(function() { | |
// your page initialization code here | |
// the DOM will be available here | |
document.getElementById("start").addEventListener("click", startEventStream); | |
document.getElementById("send").addEventListener("click", sendHomeTemperature); | |
document.getElementById("stop").addEventListener("click", stopEventStream); | |
})(); | |
function stopEventStream() { | |
console.log("stopEventStream()"); | |
window.evntSrc.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment