Update shiny input from java script
<p>I've looked around and tried a few things but I can't seem to get it to work. I want to be able to update the value stored in input$someVar from a bit of js code.  What I need to on a certain element click, I need to update the input$someVar value. I know there are functions like "updateSelectInput()" but those are called from the server.</p>

<p>I can physically change the value of the data in the HTML that is used int he data attribute and that is displayed, but the server doesnt see this as a change and the input$someVar stays the same. </p>

<p>I  have tried </p>

<pre><code>var selectBind = Shiny.inputBindings.bindings[5];

selectBind.binding.setValue('#loc', newValue);
</code></pre>

<p>within an event handler, where #loc is the id of the input element, in hope that I could do it that way but this gives me an error.</p>

<p>Is there a way to do the functionality of "updateSelectInput()" within java script in the ui?</p>