Create a popup dialog box interactive
<p>I was wondering if it is possible to create a popup dialog box interactive by using shiny (and shinyBS).</p>

<p>For example, I have a string and I want to change it and before doing a dialog box shows up asking if I really want to change it. In case I say "yes", it does it otherwise it discards the change. Here's my try but I found two issues: 1. if you click "yes" or "no", nothing changes 2. you always need to close the box by the bottom "close".</p>

<pre><code>rm(list = ls())
library(shiny)
library(shinyBS)

name &lt;- "myname"

ui =fluidPage(
  textOutput("curName"),
  br(),
  textInput("newName", "Name of variable:", name),
  br(),
  actionButton("BUTnew", "Change"),
  bsModal("modalnew", "Change name", "BUTnew", size = "small",
          textOutput("textnew"),
          actionButton("BUTyes", "Yes"),
          actionButton("BUTno", "No")
  )
)
server = function(input, output, session) {
  output$curName &lt;- renderText({paste0("Current name: ", name)})

  observeEvent(input$BUTnew, {
    output$textnew &lt;- renderText({paste0("Do you want to change the name?")})
  })

  observeEvent(input$BUTyes, {
    name &lt;- input$newName
  })
}
runApp(list(ui = ui, server = server))
</code></pre>

<p>Other proposals are more than welcome!!</p>