Skip to content

Instantly share code, notes, and snippets.

@mtothet
mtothet / mycode.js
Created December 9, 2015 10:04 — forked from markheckmann/mycode.js
client/server interaction with shiny - part 3 (separate JS file)
// Execute function body when the HTML document is ready
$(document).ready(function() {
// javascript code to send data to shiny server
document.getElementById("mydiv").onclick = function() {
var number = Math.random();
Shiny.onInputChange("mydata", number);
};