Reputation: 284
With the help of this code i can open url in new tab instead of that how to open this url as a popup in the same window
library(shiny)
ui <- fluidPage(shiny::fluidRow(shiny::actionButton(inputId='ab1',
label="click here", value = "Open popup",onclick ="window.open('http://google.com','_blank')")))
server <- function(input, output) {}
shinyApp(ui, server)
Thanks in advance
Upvotes: 0
Views: 1583
Reputation: 84529
Maybe:
onclick = 'window.open("http://google.com", "Google", "width=480,height=360,resizable=no,toolbar=no,menubar=no,location=no,status=no")'
Upvotes: 1
Reputation: 29387
I guess you just wanted a resizable browser tab popup, for this you edit the JS
and add resizable
argument:
library(shiny)
ui <- fluidPage(shiny::fluidRow(shiny::actionButton(inputId='ab1',
label="click here", value = "Open popup",onclick ="window.open('http://google.com','_blank','resizable,height=260,width=370')")))
server <- function(input, output) {}
shinyApp(ui, server)
Upvotes: 2