R shiny - last clicked button id inside shiny module functionR shiny - last clicked button idR Shiny: How to change background color of a tablehaving problems implementing a “Run” button with ShinyBuilding R package “no visible global function definition for” shiny functionsHow can tab's page reset to initial state when moving from one tab to another in R shiny?Shiny actionButton() output in onRender() function of htmlWidgetshow to calculate the intersection area of two circles in shiny or R codeoutput shiny app object details in UIUsing Dean Attali's “Busy…” / “Done!” / “Error” feedback after pressing a button code inside a shiny moduleHow to display a different color on each side of range slider in Shiny app? As you slide on either side, color should also be filled automaticallyR Shiny - dynamically created actionButtons either all firing at once (observeEvent) or not firing at all (eventReactive)

My employer faked my resume to acquire projects

Can a person survive on blood in place of water?

Is it legal to meet with potential future employers in the UK, whilst visiting from the USA

Python program to take in two strings and print the larger string

Looking for a soft substance that doesn't dissolve underwater

In general, would I need to season a meat when making a sauce?

Construct a word ladder

Leaching of copper using zinc

Make 24 using exactly three 3s

Plot twist where the antagonist wins

Should one buy new hardware after a system compromise?

Could a 19.25mm revolver actually exist?

Where have Brexit voters gone?

How can I tell if I'm being too picky as a referee?

What was the idiom for something that we take without a doubt?

What to do when you've set the wrong ISO for your film?

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

Do photons bend spacetime or not?

Is it true that cut time means "play twice as fast as written"?

Sitecore 9.0 works with solr 7.2.1?

Boss wants me to falsify a report. How should I document this unethical demand?

Did 20% of US soldiers in Vietnam use heroin, 95% of whom quit afterwards?

When the Torah was almost lost and one (or several) Rabbis saved it?

Can the Levitate spell be used to cause damage by slamming a creature?



R shiny - last clicked button id inside shiny module function


R shiny - last clicked button idR Shiny: How to change background color of a tablehaving problems implementing a “Run” button with ShinyBuilding R package “no visible global function definition for” shiny functionsHow can tab's page reset to initial state when moving from one tab to another in R shiny?Shiny actionButton() output in onRender() function of htmlWidgetshow to calculate the intersection area of two circles in shiny or R codeoutput shiny app object details in UIUsing Dean Attali's “Busy…” / “Done!” / “Error” feedback after pressing a button code inside a shiny moduleHow to display a different color on each side of range slider in Shiny app? As you slide on either side, color should also be filled automaticallyR Shiny - dynamically created actionButtons either all firing at once (observeEvent) or not firing at all (eventReactive)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I am trying to access the last clicked checkbox or button id from inside a Shiny module.



I have found the great response from this post helpful: R shiny - last clicked button id and have adapted the code to my question. I also took a hint from this post: https://github.com/datastorm-open/visNetwork/issues/241 but still can't get it working.



user_inputUI <- function(id)
# Create a namespace function using the provided id
ns <- NS(id)

tagList(
tags$head(tags$script(HTML("$(document).on('click', '.needed', function ()
Shiny.onInputChange('", ns("last_btn"), "', this.id);
);"))),
tags$span(HTML('<div><input id="first" type="checkbox" class="needed"></div>')),
actionButton(ns("second"), "Second",class="needed"),
actionButton(ns("third"), "Third",class="needed"),
actionButton(ns("save"), "save"),
selectInput(ns("which_"),"which_",c("first","second","third"))
)


update_options <- function(input, output, session)

observeEvent(input$save,

updateSelectInput(session,"which_",selected = input$last_btn)
)

return(reactive(input$last_btn))


ui <- shinyUI(fluidPage(

titlePanel("Track last clicked Action button"),


sidebarLayout(
sidebarPanel(
user_inputUI("link_id")
),

mainPanel(

textOutput("lastButtonCliked")
)
)
))


server <- shinyServer(function(input, output,session)

last_id <- callModule(update_options, "link_id")
output$lastButtonCliked=renderText(last_id())

)


# Run the application
shinyApp(ui = ui, server = server)


I would expect the input$last_btn value (the id name of the last button clicked) to be created and returned at the bottom of the app as well as becoming the updated input in the selectize. However, the input$last_btn is not being created, I have checked this using the debugging browser() as well.










share|improve this question




























    1















    I am trying to access the last clicked checkbox or button id from inside a Shiny module.



    I have found the great response from this post helpful: R shiny - last clicked button id and have adapted the code to my question. I also took a hint from this post: https://github.com/datastorm-open/visNetwork/issues/241 but still can't get it working.



    user_inputUI <- function(id)
    # Create a namespace function using the provided id
    ns <- NS(id)

    tagList(
    tags$head(tags$script(HTML("$(document).on('click', '.needed', function ()
    Shiny.onInputChange('", ns("last_btn"), "', this.id);
    );"))),
    tags$span(HTML('<div><input id="first" type="checkbox" class="needed"></div>')),
    actionButton(ns("second"), "Second",class="needed"),
    actionButton(ns("third"), "Third",class="needed"),
    actionButton(ns("save"), "save"),
    selectInput(ns("which_"),"which_",c("first","second","third"))
    )


    update_options <- function(input, output, session)

    observeEvent(input$save,

    updateSelectInput(session,"which_",selected = input$last_btn)
    )

    return(reactive(input$last_btn))


    ui <- shinyUI(fluidPage(

    titlePanel("Track last clicked Action button"),


    sidebarLayout(
    sidebarPanel(
    user_inputUI("link_id")
    ),

    mainPanel(

    textOutput("lastButtonCliked")
    )
    )
    ))


    server <- shinyServer(function(input, output,session)

    last_id <- callModule(update_options, "link_id")
    output$lastButtonCliked=renderText(last_id())

    )


    # Run the application
    shinyApp(ui = ui, server = server)


    I would expect the input$last_btn value (the id name of the last button clicked) to be created and returned at the bottom of the app as well as becoming the updated input in the selectize. However, the input$last_btn is not being created, I have checked this using the debugging browser() as well.










    share|improve this question
























      1












      1








      1








      I am trying to access the last clicked checkbox or button id from inside a Shiny module.



      I have found the great response from this post helpful: R shiny - last clicked button id and have adapted the code to my question. I also took a hint from this post: https://github.com/datastorm-open/visNetwork/issues/241 but still can't get it working.



      user_inputUI <- function(id)
      # Create a namespace function using the provided id
      ns <- NS(id)

      tagList(
      tags$head(tags$script(HTML("$(document).on('click', '.needed', function ()
      Shiny.onInputChange('", ns("last_btn"), "', this.id);
      );"))),
      tags$span(HTML('<div><input id="first" type="checkbox" class="needed"></div>')),
      actionButton(ns("second"), "Second",class="needed"),
      actionButton(ns("third"), "Third",class="needed"),
      actionButton(ns("save"), "save"),
      selectInput(ns("which_"),"which_",c("first","second","third"))
      )


      update_options <- function(input, output, session)

      observeEvent(input$save,

      updateSelectInput(session,"which_",selected = input$last_btn)
      )

      return(reactive(input$last_btn))


      ui <- shinyUI(fluidPage(

      titlePanel("Track last clicked Action button"),


      sidebarLayout(
      sidebarPanel(
      user_inputUI("link_id")
      ),

      mainPanel(

      textOutput("lastButtonCliked")
      )
      )
      ))


      server <- shinyServer(function(input, output,session)

      last_id <- callModule(update_options, "link_id")
      output$lastButtonCliked=renderText(last_id())

      )


      # Run the application
      shinyApp(ui = ui, server = server)


      I would expect the input$last_btn value (the id name of the last button clicked) to be created and returned at the bottom of the app as well as becoming the updated input in the selectize. However, the input$last_btn is not being created, I have checked this using the debugging browser() as well.










      share|improve this question














      I am trying to access the last clicked checkbox or button id from inside a Shiny module.



      I have found the great response from this post helpful: R shiny - last clicked button id and have adapted the code to my question. I also took a hint from this post: https://github.com/datastorm-open/visNetwork/issues/241 but still can't get it working.



      user_inputUI <- function(id)
      # Create a namespace function using the provided id
      ns <- NS(id)

      tagList(
      tags$head(tags$script(HTML("$(document).on('click', '.needed', function ()
      Shiny.onInputChange('", ns("last_btn"), "', this.id);
      );"))),
      tags$span(HTML('<div><input id="first" type="checkbox" class="needed"></div>')),
      actionButton(ns("second"), "Second",class="needed"),
      actionButton(ns("third"), "Third",class="needed"),
      actionButton(ns("save"), "save"),
      selectInput(ns("which_"),"which_",c("first","second","third"))
      )


      update_options <- function(input, output, session)

      observeEvent(input$save,

      updateSelectInput(session,"which_",selected = input$last_btn)
      )

      return(reactive(input$last_btn))


      ui <- shinyUI(fluidPage(

      titlePanel("Track last clicked Action button"),


      sidebarLayout(
      sidebarPanel(
      user_inputUI("link_id")
      ),

      mainPanel(

      textOutput("lastButtonCliked")
      )
      )
      ))


      server <- shinyServer(function(input, output,session)

      last_id <- callModule(update_options, "link_id")
      output$lastButtonCliked=renderText(last_id())

      )


      # Run the application
      shinyApp(ui = ui, server = server)


      I would expect the input$last_btn value (the id name of the last button clicked) to be created and returned at the bottom of the app as well as becoming the updated input in the selectize. However, the input$last_btn is not being created, I have checked this using the debugging browser() as well.







      r module shiny shinyjs shinymodules






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 24 at 3:42









      amycookieamycookie

      82




      82






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You were almost there, but there were some minor formatting issues. The updated code is listed below.



          You mainly misused HTML (I changed it to JS but thats not the problem) in the way that you just comma separated the ns("last_btn"). If you had inspected the output of your original HTML(...) statement, you would have seen that the resulting JavaScript string was



          Shiny.onInputChange(' link_id-last_btn ', this.id);


          And I mean the spaces around the input id. Because of the extra spaces, the input was not properly mapped on input$last_btn. I used paste0 in my example to correctly glue the strings together.



          Second, there are some missing ns calls which I corrected, but that you would for sure have found out yourself once the input blocker was gone.



          user_inputUI <- function(id)
          # Create a namespace function using the provided id
          ns <- NS(id)

          tagList(
          tags$head(
          tags$script(
          JS(paste0("$(document).on('click', '.needed', function () debugger;
          Shiny.onInputChange('", ns("last_btn"), "', this.id);
          );"))
          )
          ),
          tags$span(HTML(paste0('<div><input id="', ns("first"), '" type="checkbox" class="needed"></div>'))),
          actionButton(ns("second"), "Second", class="needed"),
          actionButton(ns("third"), "Third", class="needed"),
          actionButton(ns("save"), "save"),
          selectInput(ns("which_"), "which_", c(ns("first"), ns("second"), ns("third")))
          )


          update_options <- function(input, output, session)

          observeEvent(input$last_btn,
          print(input$last_btn)
          )

          observeEvent(input$save,
          updateSelectInput(session, "which_", selected = input$last_btn)
          )

          return(reactive(input$last_btn))


          ui <- shinyUI(fluidPage(

          titlePanel("Track last clicked Action button"),


          sidebarLayout(
          sidebarPanel(
          user_inputUI("link_id")
          ),

          mainPanel(

          textOutput("lastButtonCliked")
          )
          )
          ))


          server <- shinyServer(function(input, output,session)

          last_id <- callModule(update_options, "link_id")
          output$lastButtonCliked=renderText(last_id())

          )


          # Run the application
          shinyApp(ui = ui, server = server)





          share|improve this answer























          • thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

            – amycookie
            Mar 31 at 12:53











          • Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

            – K. Rohde
            Mar 31 at 13:04











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320538%2fr-shiny-last-clicked-button-id-inside-shiny-module-function%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You were almost there, but there were some minor formatting issues. The updated code is listed below.



          You mainly misused HTML (I changed it to JS but thats not the problem) in the way that you just comma separated the ns("last_btn"). If you had inspected the output of your original HTML(...) statement, you would have seen that the resulting JavaScript string was



          Shiny.onInputChange(' link_id-last_btn ', this.id);


          And I mean the spaces around the input id. Because of the extra spaces, the input was not properly mapped on input$last_btn. I used paste0 in my example to correctly glue the strings together.



          Second, there are some missing ns calls which I corrected, but that you would for sure have found out yourself once the input blocker was gone.



          user_inputUI <- function(id)
          # Create a namespace function using the provided id
          ns <- NS(id)

          tagList(
          tags$head(
          tags$script(
          JS(paste0("$(document).on('click', '.needed', function () debugger;
          Shiny.onInputChange('", ns("last_btn"), "', this.id);
          );"))
          )
          ),
          tags$span(HTML(paste0('<div><input id="', ns("first"), '" type="checkbox" class="needed"></div>'))),
          actionButton(ns("second"), "Second", class="needed"),
          actionButton(ns("third"), "Third", class="needed"),
          actionButton(ns("save"), "save"),
          selectInput(ns("which_"), "which_", c(ns("first"), ns("second"), ns("third")))
          )


          update_options <- function(input, output, session)

          observeEvent(input$last_btn,
          print(input$last_btn)
          )

          observeEvent(input$save,
          updateSelectInput(session, "which_", selected = input$last_btn)
          )

          return(reactive(input$last_btn))


          ui <- shinyUI(fluidPage(

          titlePanel("Track last clicked Action button"),


          sidebarLayout(
          sidebarPanel(
          user_inputUI("link_id")
          ),

          mainPanel(

          textOutput("lastButtonCliked")
          )
          )
          ))


          server <- shinyServer(function(input, output,session)

          last_id <- callModule(update_options, "link_id")
          output$lastButtonCliked=renderText(last_id())

          )


          # Run the application
          shinyApp(ui = ui, server = server)





          share|improve this answer























          • thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

            – amycookie
            Mar 31 at 12:53











          • Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

            – K. Rohde
            Mar 31 at 13:04















          0














          You were almost there, but there were some minor formatting issues. The updated code is listed below.



          You mainly misused HTML (I changed it to JS but thats not the problem) in the way that you just comma separated the ns("last_btn"). If you had inspected the output of your original HTML(...) statement, you would have seen that the resulting JavaScript string was



          Shiny.onInputChange(' link_id-last_btn ', this.id);


          And I mean the spaces around the input id. Because of the extra spaces, the input was not properly mapped on input$last_btn. I used paste0 in my example to correctly glue the strings together.



          Second, there are some missing ns calls which I corrected, but that you would for sure have found out yourself once the input blocker was gone.



          user_inputUI <- function(id)
          # Create a namespace function using the provided id
          ns <- NS(id)

          tagList(
          tags$head(
          tags$script(
          JS(paste0("$(document).on('click', '.needed', function () debugger;
          Shiny.onInputChange('", ns("last_btn"), "', this.id);
          );"))
          )
          ),
          tags$span(HTML(paste0('<div><input id="', ns("first"), '" type="checkbox" class="needed"></div>'))),
          actionButton(ns("second"), "Second", class="needed"),
          actionButton(ns("third"), "Third", class="needed"),
          actionButton(ns("save"), "save"),
          selectInput(ns("which_"), "which_", c(ns("first"), ns("second"), ns("third")))
          )


          update_options <- function(input, output, session)

          observeEvent(input$last_btn,
          print(input$last_btn)
          )

          observeEvent(input$save,
          updateSelectInput(session, "which_", selected = input$last_btn)
          )

          return(reactive(input$last_btn))


          ui <- shinyUI(fluidPage(

          titlePanel("Track last clicked Action button"),


          sidebarLayout(
          sidebarPanel(
          user_inputUI("link_id")
          ),

          mainPanel(

          textOutput("lastButtonCliked")
          )
          )
          ))


          server <- shinyServer(function(input, output,session)

          last_id <- callModule(update_options, "link_id")
          output$lastButtonCliked=renderText(last_id())

          )


          # Run the application
          shinyApp(ui = ui, server = server)





          share|improve this answer























          • thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

            – amycookie
            Mar 31 at 12:53











          • Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

            – K. Rohde
            Mar 31 at 13:04













          0












          0








          0







          You were almost there, but there were some minor formatting issues. The updated code is listed below.



          You mainly misused HTML (I changed it to JS but thats not the problem) in the way that you just comma separated the ns("last_btn"). If you had inspected the output of your original HTML(...) statement, you would have seen that the resulting JavaScript string was



          Shiny.onInputChange(' link_id-last_btn ', this.id);


          And I mean the spaces around the input id. Because of the extra spaces, the input was not properly mapped on input$last_btn. I used paste0 in my example to correctly glue the strings together.



          Second, there are some missing ns calls which I corrected, but that you would for sure have found out yourself once the input blocker was gone.



          user_inputUI <- function(id)
          # Create a namespace function using the provided id
          ns <- NS(id)

          tagList(
          tags$head(
          tags$script(
          JS(paste0("$(document).on('click', '.needed', function () debugger;
          Shiny.onInputChange('", ns("last_btn"), "', this.id);
          );"))
          )
          ),
          tags$span(HTML(paste0('<div><input id="', ns("first"), '" type="checkbox" class="needed"></div>'))),
          actionButton(ns("second"), "Second", class="needed"),
          actionButton(ns("third"), "Third", class="needed"),
          actionButton(ns("save"), "save"),
          selectInput(ns("which_"), "which_", c(ns("first"), ns("second"), ns("third")))
          )


          update_options <- function(input, output, session)

          observeEvent(input$last_btn,
          print(input$last_btn)
          )

          observeEvent(input$save,
          updateSelectInput(session, "which_", selected = input$last_btn)
          )

          return(reactive(input$last_btn))


          ui <- shinyUI(fluidPage(

          titlePanel("Track last clicked Action button"),


          sidebarLayout(
          sidebarPanel(
          user_inputUI("link_id")
          ),

          mainPanel(

          textOutput("lastButtonCliked")
          )
          )
          ))


          server <- shinyServer(function(input, output,session)

          last_id <- callModule(update_options, "link_id")
          output$lastButtonCliked=renderText(last_id())

          )


          # Run the application
          shinyApp(ui = ui, server = server)





          share|improve this answer













          You were almost there, but there were some minor formatting issues. The updated code is listed below.



          You mainly misused HTML (I changed it to JS but thats not the problem) in the way that you just comma separated the ns("last_btn"). If you had inspected the output of your original HTML(...) statement, you would have seen that the resulting JavaScript string was



          Shiny.onInputChange(' link_id-last_btn ', this.id);


          And I mean the spaces around the input id. Because of the extra spaces, the input was not properly mapped on input$last_btn. I used paste0 in my example to correctly glue the strings together.



          Second, there are some missing ns calls which I corrected, but that you would for sure have found out yourself once the input blocker was gone.



          user_inputUI <- function(id)
          # Create a namespace function using the provided id
          ns <- NS(id)

          tagList(
          tags$head(
          tags$script(
          JS(paste0("$(document).on('click', '.needed', function () debugger;
          Shiny.onInputChange('", ns("last_btn"), "', this.id);
          );"))
          )
          ),
          tags$span(HTML(paste0('<div><input id="', ns("first"), '" type="checkbox" class="needed"></div>'))),
          actionButton(ns("second"), "Second", class="needed"),
          actionButton(ns("third"), "Third", class="needed"),
          actionButton(ns("save"), "save"),
          selectInput(ns("which_"), "which_", c(ns("first"), ns("second"), ns("third")))
          )


          update_options <- function(input, output, session)

          observeEvent(input$last_btn,
          print(input$last_btn)
          )

          observeEvent(input$save,
          updateSelectInput(session, "which_", selected = input$last_btn)
          )

          return(reactive(input$last_btn))


          ui <- shinyUI(fluidPage(

          titlePanel("Track last clicked Action button"),


          sidebarLayout(
          sidebarPanel(
          user_inputUI("link_id")
          ),

          mainPanel(

          textOutput("lastButtonCliked")
          )
          )
          ))


          server <- shinyServer(function(input, output,session)

          last_id <- callModule(update_options, "link_id")
          output$lastButtonCliked=renderText(last_id())

          )


          # Run the application
          shinyApp(ui = ui, server = server)






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 25 at 8:36









          K. RohdeK. Rohde

          6,1681843




          6,1681843












          • thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

            – amycookie
            Mar 31 at 12:53











          • Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

            – K. Rohde
            Mar 31 at 13:04

















          • thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

            – amycookie
            Mar 31 at 12:53











          • Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

            – K. Rohde
            Mar 31 at 13:04
















          thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

          – amycookie
          Mar 31 at 12:53





          thank you so much! That opens up a suite of possibilities for my code now. You said 'if you had inspected the output of your original HTML' in your answer. How do you inspect HTML output in a shiny app with the ns()? I am pretty new to HTML. If it's too hard to explain don't worry about it. Thanks again : )

          – amycookie
          Mar 31 at 12:53













          Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

          – K. Rohde
          Mar 31 at 13:04





          Just replace tags$script with tags$span and put it anywhere in the document. Or just print it from within your code.

          – K. Rohde
          Mar 31 at 13:04



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320538%2fr-shiny-last-clicked-button-id-inside-shiny-module-function%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해