I need to add weather information on the dashboard. Normally tags$iframe will use for the purpose, but it wont work within the dashboard. I have used following code
server <-shinyServer(function(input, output, session) {
observe({
input$btn
session$sendCustomMessage(type = "resetFileInputHandler", "file1")
})})
ui <-shinyUI(bootstrapPage(
dbHeader <- dashboardHeader(title = "",
tags$li(a(href = '',
icon(""),
title = ""),
class = "dropdown"),
tags$li(a(href = 'https://www.redhat.com/en',
img(src = '1.jpg',
title = "redhat", height = "70px",style = "align:centre;"),
style = "padding-top:5px; padding-bottom:5px;"),
class = "dropdown"),
tags$li(a(href = 'https://ubuntu.com/',
img(src = '2.png',
title = "ubuntu", height = "70px"),
style = "padding-top:5px; padding-bottom:5px;"),
class = "dropdown"),
tags$li(a(href = '',
(src = "https://forecast.io/embed/#lat=42.3583&lon=-71.0603&name=Boston"
),
style = "padding-top:5px; padding-bottom:5px;"),
class = "dropdown")
),
fileInput('file1', 'Choose File'),actionButton("btn", "Trigger server to reset file input"),
tags$script('
Shiny.addCustomMessageHandler("resetFileInputHandler", function(x) {
var id = "#" + x + "_progress";
var idBar = id + " .bar";
$(id).css("visibility", "hidden");
$(idBar).css("width", "0%");
});
')
))
Expected output