Skip to content

Instantly share code, notes, and snippets.

@cianclarke
Created December 16, 2015 23:45
Show Gist options
  • Save cianclarke/8a7345dc4b023ad0d0cc to your computer and use it in GitHub Desktop.
Save cianclarke/8a7345dc4b023ad0d0cc to your computer and use it in GitHub Desktop.
document.getElementById('say_hello').onclick = function () {
document.getElementById('cloudResponse').innerHTML = "<p>Calling Cloud.....</p>";
$fh.cloud(
{
path: 'weather',
data: {
location: document.getElementById('hello_to').value
}
},
function (res) {
document.getElementById('cloudResponse').innerHTML = "<p>" + res.main.temp + "</p>";
},
function (code, errorprops, params) {
alert('An error occured: ' + code + ' : ' + errorprops);
}
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment