title: How to use shiny javascript functions?
body: <p>I want to send data from javascript to R using shiny js function, but is not working. What I have done is a simple example, in which setinputValue send "noone" to "too" input$too</p>
  
  <p>Here is the code:</p>
  
  <pre><code>library(shiny)
  
  
  ui &lt;- fluidPage(
  
    HTML("&lt;script&gt;
         $( document ).ready(function() {
         Shiny.setInputValue('too', 'noone');
  
         });&lt;/script&gt;"),
  
  
        textOutput("table")
  
  
    )
  
  
  server &lt;- function(input, output) {
   output$table &lt;- renderPrint(input$too)
  
  
  }
  
   shinyApp(ui,server)
  </code></pre>
  
  <p>The js error I get is: Shiny.setInputValue is not a function</p>