Javascript – How to pass dynamic variable from server to UI?
I have a small application in shiny: library(shiny) ui <- fluidPage( #htmlOutput("d"), tags$p(id = 'g', class = 'newClass', 'This is a paragraph'),tags$p(id = "demo"), tags$script(HTML("var tit = document.getElementById('g');tit.onclick = function (){document.getElementById('demo').innerHTML = Date()}")) ) server <- function(input, output, session) {…