Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

365
Views
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 answers
Answer question

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 Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!