You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the example to create a redirect page for my Shiny app. The code works under fluidpage(), but doesn't work for our app under dashboardBody(). I'm familiar with R but not Javascript, so couldn;t really figure out why.
Below is a minimal reproducible example (of Javascript not working within dashboardBody()): (test2.html can be any html, I just use some text)
Hi all,
I used the example to create a redirect page for my Shiny app. The code works under fluidpage(), but doesn't work for our app under dashboardBody(). I'm familiar with R but not Javascript, so couldn;t really figure out why.
Below is a minimal reproducible example (of Javascript not working within dashboardBody()): (test2.html can be any html, I just use some text)
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
$(function() {$ (document).on('shiny:disconnected shiny:error', function(event) {
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
tags$script("
$('.container-fluid').load('./test.html');
}) });
"),
actionButton("disconnect", "Disconnect the app")
)
)
server <- function(input, output, session) {
observeEvent(input$disconnect, {
session$close()
})
}
shinyApp(ui, server)
The text was updated successfully, but these errors were encountered: