I have a js file calling from Shiny, and looking to pass a parm to that function based on Shiny App activity. Suggestions? I can't find anywhere showing the documented. thank you
ui <- fluidPage(
user_to_say_hello_to <- 'jonny'
tags$script(src = "hello_world.js", user_to_say_hello_to) # doesn't work
#tags$script(src = "hello_world.js") runs but want to pass parm
)
And my js file located in www directory:
function hello_world(name) {
message_string = "hello " + name;
alert(message_string);
}
hello_world(<parm_from_shiny>);