Can we call observer event function using jquery in R Shiny

I am using R Shiny for my web application, I want to call Observer Event in my R Shiny using jquery

server = function(input,output,session){
  db =dbGetQuery(connection,"select * from employee")

   shinyInput <- function(FUN, len, id, ...) {
                    inputs <- character(len)
                    for (i in seq_len(len)) {
                           inputs[i] <- as.character(FUN(paste0(id, i), ...))
                     }
                     inputs
                  }

 db$ACTION=shinyInput(
    actionButton,
    nrow(db),
    'button_',
    label = "Cancel",
    class="cancel-enabled cancel-btn"
    onclick = 'Shiny.onInputChange(\"select_cancel_button\",this.id)'
    )

 df$table = db[c("EMPLID","EMPLOYEE","STATUS","ACTION")]

 df$DT = datatable(
  df$table,     
  selection = 'none')

 observeEvent(input$select_cancel_button,{
      //Doe SOmething 
 }
}

In the script:

$(document).ready(function(){
  $(document).on('click','.cancel-btn',function(){
    // calling observer event here
});

});

can we call in above script? Is it R Shiny allows that?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.