title: Shiny: plot results in popup window
body: <p>I am trying to build a web app with shiny and I would like to display the resulting plot of a R function in a popup 
  window rather than in mainPanel.
  For instance, for the below example (from <a href="http://shiny.rstudio.com/articles/action-buttons.html" rel="noreferrer">http://shiny.rstudio.com/articles/action-buttons.html</a>), clicking on "Go" button 
  would show the same plot but in a popup window.</p>
  
  <p>I tried to add some javascript, but I have not succeeded yet... Can anyone help ?</p>
  
  <p>Thank you in advance !</p>
  
  <pre><code>library(shiny)
  ui &lt;- fluidPage(
      actionButton("go", "Go"),
      numericInput("n", "n", 50),
   plotOutput("plot")
  )
  server &lt;- function(input, output) {
    randomVals &lt;- eventReactive(input$go, {
    runif(input$n)
    })
    output$plot &lt;- renderPlot({
     hist(randomVals())
   })
  }
  shinyApp(ui, server)
  </code></pre>