In this example, we're going to find out something about the state of the application from the DOM, grab it with JavaScript, and write it back to the DOM. We'll look at ui.R to put together the page and then look at the JavaScript. The server.R file is unchanged, so we will not discuss it here.