Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

374
Visualizações
Preventing Apex Button Double click

Hi I have a button that inserts empty records into an interactive grid. I want to prevent the user from being able to double click that button because it populates duplicate rows. I have a server side argument that says if there are rows the button does not appear however they are still able to double click the Populate_tables button before it vanishes. If there are any other solutions to this please sound off. I've tried everything from javascript to server-side but they are still able to double click no matter what. Here are the before and after pictures of the table. Before Double click

After Double Click

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

    $('#btnPopulateTbl').dblclick(function(e){ 
         e.preventDefault();
    });

The above code prevents the double click for a button. This is in jQuery.

about 4 years ago · Juan Pablo Isaza Relatório

0

Oracle Apex does not offer this functionality as a setting or etc. However you can use

$('#button').click(function(event) {
  if(!event.detail || event.detail == 1){
   // This will be executed once even user clicks multiple times
  }
}); 

Note that your selector must be the id or the class you provide to this button. By default 'add row' button's classes are:

class="a-Button a-Toolbar-item js-actionButton"
about 4 years ago · Juan Pablo Isaza Relatório

0

Another solution would be to have apex handle this. Suppose this is on page 1.

  • Create a page item P1_POPULATE_ROWS_CLICKED with a default value of 'N'
  • In the page process that populates the table, add the following line before the actual load:
:P1_POPULATE_ROWS_CLICKED := 'Y';
  • Add a condition to the page process that populates the table of "Item not equal to value", P1_POPULATE_ROWS_CLICKED , Y

Yet another solution is to only execute the insert statement if no rows exist with that condition yet. I can't show you how to do it because you didn't show how the table is populated but happy to do so if you edit your question. This last option is propably the most suitable.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda