Preventing Double Click on Link in List

Hello folks,
APEX 4.1
I'm supporting an application right now (which I didn't build I should add), which contains a navigation list entry which triggers an insert into a table (via a before header process fired by a request value which is set when the link is clicked.
I've had a look through the forum's search function for references to "links", "clicks", "double clicks" and "Disabled" and came up with lots of suggestions regarding disabling a button and links in reports, but nothing for links from navigation lists:
e.g. {thread:id=9405085}
Note that some of the example suggest using the javascript pseudo-protocol. I want to avoid that method at all costs.
Rather than verbosely explain the problem, I've set up a demo page on apex.oracle.com to demonstrate it:
Workspace: JC_DEMO
Username: DEMO_USER
password: demo
the pages in question are 9999 and 10000.
(p.s. I knocked this example up as fast as I could - the app hasn't been done to my usual standards! :-) )

Okay I've solved this, or at least I've provided a solution to this particular problem on my "real" app - will amend the test case accordingly in due course but thought I'd share it on this thread anyway.
1) List Template: I took a copy of the existing List template and edited it. Under the "Sub List Entry" section, I amended both the "Sub List Template Current" and "Sub List Template Noncurrent" entries to the following:
<li><a class="#A02#" href="#LINK#">#TEXT#</a></li>In other words, I added a reference to "User Attribute No.2" (#A02#). The reason I used A02 is due to having already used A01 already for something else. Don't be too concerned about this.
2) List: I amended the "List Template" of my list to point at the amended template from step 1. Note also that my list is referenced in a list region on page Zero.
3) List Entry: I amended the list entry I wanted to disable double-clicks, Adding the following text to the 2nd entry in the "User Defined Attributes" section:
single_clickFrom step 1, you should note that this has the effect of adding the class "single_click" to the list entry. "single_click" is not referenced in any of my CSSs incidentally.
4) Page Ready Javascript: On Page Zero, I have a "Before Footer" region called "Page Ready Javascript", into which I put javascript that I want executed on page ready. The basic template for this region is as follows:
<script>
   try{
      $(function() {
      /* code you want to execute */
   catch(e){
     /* error catching code */
</script>Within the page ready function (starting with '$'), I have the following code:
$(".single_click").click( function(){
    window.location = $(this).attr('href');
    $(this).unbind('click'); /* do this because .click adds to the existing click event */
    $(this).click( function(){
       return false;
    return false;
  });Note that I'm using the "single_click" class as my jquery selector. The result of all of this is that, if you click on the relevant link in my navigation list, no matter how many times you do, it will only request the page once.
Already I can see a few things I'm not happy about but its at least a reasonable starting point. Comments/critiques welcome.

Similar Messages

  • I just downloaded Firefox 4 and I run Windows 7 Ultimate and it crashes before it loads up I double click the link and it brings up the "Mozilla Crash Reporter" everytime I try to start it.

    Basically I downloaded Firefox 4 when it was a beta and now after it's been released and everytime I double click the shortcut or the direct link in the start menu and it shows my mouse with the loading icon and then it pops up the "Mozilla Crash Reporter" and I've submitted multiple reports and got nothing back and I now can't revert back to pre-4.0 Firefox to even just use it while the problem is rectified.

    Your best bet would be to uninstall the BETA and install the actual release, instructions as follows.
    * Go to [http://www.mozilla.com/en-US/firefox/fx/?ref=logo Download Firefox 4.0] and download a fresh installation file to the desktop. If necessary, download the file with IE8 or 9, but choose to save it to your desktop when you see the prompt.
    * Hit '''CTRL+SHIFT+ESC''' to bring up '''Task Manager''', go to the '''Processes '''list and see if you can find '''firefox.exe''' running in there. If you do, right click it and choose "'''Kill Process'''".
    * Then go to Add/Remove Programs, scroll down to '''Mozilla Firefox''' and remove it, choosing to keep your bookmarks, customizations etc., (don't checkmark the box).
    * Then reboot and delete the folder called '''Mozilla Firefox''' at this location: ''C:\Program Files\Mozilla Firefox''
    * Finally run the installation file you downloaded to the desktop earlier.
    If you prefer to install the previous secure version which is v3.6.16, use the following link, otherwise the procedure is the same: [http://www.mozilla.com/en-US/firefox/all-older.html Download Firefox v3.6.16]

  • Prevent double click / double submit

    Hi,
    I have a JSP with some input fields and some command buttons within a form. When the user clicks twice on one of the buttons two requests (including the form data) are sent.
    In the server side this results in unpredictable behvior of my business logic. So I decided to prevent these double clicks on buttons. Now I have the following question.
    Are there ADF means to achive this or do I have to use JavaScript (what I wouldn't prefer)?
    Thanks for you help.
    Tom

    Hi,
    another option if using ADF Faces is to set the "blocking" property in a command button to true, which will make a double click impossible. This however, only prevents people from accidentally double submitting a request, not fom purposely doing it. For the latter usecase follow Shay's hint
    Frank

  • Prevent Double click in Document Flow

    Hello,
    We have a need in our project to restrict certain users from veiwing price in Sales Documents. We have achived this by using various exits and hiding the price. But we have a problem regarding the Document flow. When the user clicks on the document flow and then double clicks on a line indicating a Sales Document, the price is shown in an ALV display. Is there anyway to prevent this?
    Thanks in advance for your help
    Best Regards
    Anirban

    Hey Anirban,
    The same requirement we have done.
    First we used some exists to hide th price but does not go well.
    Finally we did using SHD0.
    We created a transaction varaint  by removing the conditions tab from the screen and added new tcode ZVA0* (1,2,3). Who ever the user uses the ZVA0* will not be able to see the price from anywhere .
    Regards,
    Vvieks

  • In Piano Roll, double click on note opens List editor. CAN I TURN THIS OFF?

    While editing in the Piano Roll Editor, double clicking on a note opens up the List Editor.
    CAN I TURN THIS OFF?

    I realize that it is my way of working that causes the editor to open up. When I work fast and with the zoom out a little to far, some times when trying to move a note it fails to move and when I try to move it again the List Editor opens up. I am very set in my ways after 20 years of non linear and 30 years of midi programming. I was just surprised that this is not a preference.
    I really don't want to slow down my double click settings. I like them fast to avoid this very thing, false double clicking. Maybe I'll try making them faster.
    Does anyone know where the support Feedback is located? I would love to request another pref be added.
    Message was edited by: Blearyeyes

  • Why does it show a (!) when i double click on the play list and it won't play the song?

    why does it show when i double click on the playlist and it won't play the song?

    The exclamation point means iTunes is no longer able to locate the track and the location specified.  See this article for more details.
    iTunes: Finding lost media and downloads
    B-rock

  • How do you prevent double clicks on a web site?

    So that customers don't make a duplicate transactions.

    Hope this Helps
    <html>
    <head>
    <SCRIPT language="JavaScript">
    function go(){
    if(document.test.alreadyHitted.value=="N")
    alert(document.test.alreadyHitted.value);
    document.test.action="Sample.jsp";
    document.test.method="POST";
    document.test.alreadyHitted.value="Y";
    document.test.submit();
    alert(document.test.alreadyHitted.value);
    return true;
    else
    alert("You have already done this Transaction");
    </SCRIPT>
    </head>
    <body>
    <form name="test">
    <input type="hidden" name="alreadyHitted" value="N">
    Test
    </form>
    </body>
    </html>
    Regards,
    Firoz Ahammad Shaik
    Polaris Software Labs Limited

  • RH7 HTML - Receive IE script error message when double-clicking link to auto-size pop-up

    Hi, all,
    Anybody ever seen this situation? When double-clicking on a link to an auto-size pop-up, I get the following Internet Explorer script error message:
    This error also occurs when I double-click the link in preview mode within the project. A colleague that is running the same version of IE with the same settings is not receiving this error. A couple of other co-workers are running a different version of IE, and one gets this error and one does not.
    This error does not occur if you single-click the link (which you would normally do), nor does it occur if you double-click a link to a fixed-size pop-up. Once you receive this message and click Yes or No, the link sometimes works correctly when you double-click. I haven't been able to establish a pattern. Also, if you single click the link to display the pop-up, click off of it, and then double-click the link, the error does not occur.
    As you can tell by now, this problem is kind of hard to pin down. I've done some research and I have yet to stumble upon anything that deals with this issue. Unless there is a solution out there, I can do one of two things: 1) change all of the auto-size pop-ups in the project to fixed-sized, which defeats the purpose of creating auto-size pop-ups, or 2) tell our customer not to double-click links.
    Any advice you could give would be welcome.

    Hi there
    Indeed it has been reported on many occasions over the years. Unless someone like Willam has some way cool error detection magick with the scripts, the best approach we have always offered is this.
    Educate your users on the way computers and HTML works. HTML works using SINGLE clicks, not DOUBLE clicks.
    The reason for the error is because the first click caused the computer to launch a JavaScript command to open the sized popup. The second click that followed in rapid succession confused things by asking the script to stop what it was doing and run again.
    Maybe it would help to explain it to your users like this. If you visited a restaurant and when the server asked what you wanted to order, would the become confused if you said to them: I'll have the T-Bone Steak and nearly immediately you repeated it by saying again I'll have the T-Bone Steak.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • From my list of addresses i want to double click to enter the TO bar.  How is it done? Thanks

    How double click address list to automatically enter TO: BAR on email?

    Eric - On my TASK BAR there are several icons.  One is of a person's head & shoulders.  When I double  click on it a list of my contacts with their;  Group, Name, and email address pops up.  At one time I could double click the name and the email address would automatically appear in the  ADDRESS BAR of my email.  It doesn't do that now.
    Thanks, Ken C.

  • Problem with double click in alv interactive report

    Hello frnds,
            the problem is i am displaying basic list using grid display with pf-status and usercommand forms. My first column is checkbox, after selecting checkboxes if i click on the pf-status Button then in the internal table  corresponding field is not getting updated with value 'X'. But once if i double click on the basic list after selecting the checkboxes the values are reflecting as X in the internal table . But my requirement is i want to get the values to be populated once i click on push button only ?
    fcode i have used is &IC1( which is the fcode to trigger double event).Please help me out.
    Thanks in advance.
    subash.

    hi ,
    i had used like this .. it is working...
    *&      Form  USER_COMMAND
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                            R_SELFIELD TYPE SLIS_SELFIELD.
      clear : v_flag.
      CASE R_UCOMM.
        WHEN 'DATA'.
    LOOP AT IT_TEMP.
         if it_temp-checkbox =  'X'.
              v_flag = 'X'.
              v_pernr1 = IT_TEMP-PERNR.
    *--Get compensation data and populate final internal table
              refresh it_fin.
              CALL FUNCTION 'Z_HR_COMP_STATEMENT'
                EXPORTING
                  PERNR = v_pernr1
                  BEGDA = s_date-low
                  ENDDA = s_date-high
                TABLES
                  FINAL = it_fin.
              if not it_fin[] is initial.
                delete adjacent duplicates from  it_fin comparing pernr.
                read table it_fin index 1.
                move-corresponding it_fin to it_final.
                append it_final.
                clear it_final.
              endif.
            endif.
         enddo.
    ENDLOOP.
          if not v_flag is initial.
    *------ display final data
            PERFORM final_display.
          else.
            message s000 with 'Select atleast one pernr'.
          endif.
      endcase.
    ENDFORM.                    "USER_COMMAND
    regards,
    venkat.

  • Double click on a JTable row.

    I got and run a sample about double click on a JTable and it works fine. This sample defines a TableModel as shown at the end this note.
    On the other hand, I have an application in which I have defined a JTable
    using the DefaultTableModel as follows :
    DefaultTableModel dtm = new DefaultTableModel(data, names);
    JTable table  = new JTable(dtm);  where data and names are String arrays.
    Of course the mouse listener stuffs have been also specified.
    table.addMouseListener(new MouseAdapter(){
         public void mouseClicked(MouseEvent e){
          if (e.getClickCount() == 2){
             System.out.println(" double click" );
         } );Because the difference with the sample was the table model,
    I changed it with the DefaultTableModel class. At this point, the Double click does not work anymore.
    So I gues it should be an option which prevents double click to work.
    I thought of using mousePress() instead of mouseClick(), but it's very dangerous (I tried). . If by error the user clicks twice (instead of only once) the mousePress method is invoked twice for the same entry
    My question is now simple, may I use double click on a JTable with the default table model. If so, what I have to do ?
    Thanks a lot
    Gege
    TableModel dataModel = new AbstractTableModel() {
         public int getColumnCount() { return names.length; }
         public int getRowCount() { return data.length;}
         public Object getValueAt(int row, int col) {return data[row][col];}
         public String getColumnName(int column) {return names[column];}
         public Class getColumnClass(int col) {return getValueAt(0,col).getClass();}
         public void setValueAt(Object aValue, int row, int column) {
           data[row][column] = aValue;
         };

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class ClickIt extends MouseAdapter
        public void mousePressed(MouseEvent e)
            JTable table = (JTable)e.getSource();
            Point p = e.getPoint();
            if(e.getClickCount() == 2)
                System.out.println("table.isEditing = " + table.isEditing());
            int row = table.rowAtPoint(p);
            int col = table.columnAtPoint(p);
            String value = (String)table.getValueAt(row,col);
            System.out.println(value);
        private JTable getLeftTable()
            final String[] names = { "column 1", "column 2", "column 3", "column 4" };
            final Object[][] data = getData("left");
            TableModel dataModel = new AbstractTableModel() {
                public int getColumnCount() { return names.length; }
                public int getRowCount() { return data.length;}
                public Object getValueAt(int row, int col) {return data[row][col];}
                public String getColumnName(int column) {return names[column];}
                public Class getColumnClass(int col) {return getValueAt(0,col).getClass();}
                public void setValueAt(Object aValue, int row, int column) {
                    data[row][column] = aValue;
            JTable table = new JTable(dataModel);
            return configure(table);
        private JTable getRightTable()
            String[] colNames = { "column 1", "column 2", "column 3", "column 4" };
            JTable table = new JTable(new DefaultTableModel(getData("right"), colNames));
            return configure(table);
        private Object[][] getData(String s)
            int rows = 4, cols = 4;
            Object[][] data = new Object[rows][cols];
            for(int row = 0; row < rows; row++)
                for(int col = 0; col < cols; col++)
                    data[row][col] = s + " " + (row*cols + col + 1);
            return data;
        private JTable configure(JTable table)
            table.setColumnSelectionAllowed(true);
            table.setCellSelectionEnabled(true);
            table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            table.setPreferredScrollableViewportSize(table.getPreferredSize());
            table.addMouseListener(this);
            return table;
        private JPanel getContent()
            JPanel panel = new JPanel(new GridLayout(1,0,0,5));
            panel.add(new JScrollPane(getLeftTable()));
            panel.add(new JScrollPane(getRightTable()));
            return panel;
        public static void main(String[] args)
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setContentPane(new ClickIt().getContent());
            f.pack();
            f.setVisible(true);
    }

  • Trying to catch mouse double click

    Using come code in the API 1.3 documentation, I created a JList and am trying to catch when a user double clicks on an item in the list. I have the following snippet of code:
    public void mouseClicked(MouseEvent e) {
    if ((e.getClickCount() == 3) && (e.getSource() == list1)) {
    int index1 = list1.locationToIndex(e.getPoint());
    System.out.println("Double clicked from the left list on Item " + index1);
    When I double click on an item in list1, it prints out the output line twice as in:
    Double clicked from the left list on Item 1
    Double clicked from the left list on Item 1
    How can I get it to run the code only once. I'm not sure why it's running it twice. Any Ideas would be helpful. Thanks....
    Matt Menard

    I've used similar procedure with success in JDK1.3.1. Without seeing the rest of your code, the only thing left for you to experiment with is to call the consume() method if the count is greater than 1. I did notice that Java mouse event handler leaves much to be desired. For example, the mouseentered and mouseexited events kept getting fired even tho the mouse has entered and never leave.
    V.V.

  • Nautilus 3.16 Cannot double-click with Icon-View to open items

    I'm updated testing/nautilus-3.16, and it cannot double-click to open ever items.
    But goto Preferences -> Behavior to set ' Single click to open items '
    Single click is working on nautilus, It's can single click to open items.
    And goto Preferences -> Default View to set 'List View'
    Double click is working with 'List View'.
    Not have anything error code in Terminal.
    And I reset gconf and dconf, Icon View with double-click still not work.
    How to solve it?
    Last edited by MayKiller (2015-04-02 10:55:18)

    ewaller wrote:
    Moving to testing.
    Maykiller, you reported the thread to the moderators.  Did you perhaps mean to reply to the thread?
    Sorry for that, I clicked 'report', it's wrong.
    I was mean it is reply for that user...
    Last edited by MayKiller (2015-04-04 12:42:22)

  • JTree Double Click

    Is there any way I can remove the default double click behaviour for a node in a JTree? Currently it expands or collapses the node, but I want it to do something else. I have set a listener up so it can do the new task, but I want to remove the expand/collapse behaviour as well.

    But it isn't....
    With the TreeWillExpandListener I cannot distinguish between the two expansion methods.
    However, I have found another, extremely simple way of doing what I want, using the JTree.setToggleClickCount(int) method. This sets the number of clicks needed to expand the node (but does not affect clicking on the + box). By setting this to a high number, I can prevent double clicks from expanding nodes, thus allowing my own double click listener to do the stuff I need.

  • Run bash command on clicking irc:// links

    I want a certain program to open IRC rooms and servers linked in pages. However the program in question needs flags to interpret the links supplied, so just choosing the executable binary for the client is not enough.

    Yes, don't fast double click a link that isn't meant to be double clicked.
    See www.grainge.org for RoboHelp and Authoring tips

Maybe you are looking for

  • Default Cost center in Foreign Exchange fluctuation account

    Hi I am doing FB60 of 100$ (1$ = Rs.45). Cost center used at the time of FB60 is 1100 (i,e, engineering division) Now i am paying in full and clearing the same invoice. Exchange rate at the time of Payment is 1$ = Rs.47. Now the SAP is picking the co

  • HT4796 have migrated the info from old pc to mac, but cant access it, and ideas?

    i have migrated the info from my old PC, but cannot access it, any advice please?

  • Spool file size significantly larger in Reader X compared to Reader 7

    I upgraded my computer to windows 7 recently and have since upgraded to Adobe Reader X as well. Previously i was using Adobe Reader 7. I have noticed that when i print a particular file through Reader X, it takes almost 10 over minutes to print the f

  • Keyword and Keyword SETS export option

    We REALLY, REALLY need a way to export complete Keyword Sets and Keywords to a file. I now know, sadly too late, that you can copy the folders from--C:\Documents and Settings\username\Application Data\Adobe\Bridge--to someplace safe and get a backup.

  • X11 printing font controls

    I continue to have problems controlling my printer from some OS X applications (emacs and xemacs, to be specific). While I can print from emacs without apparent difficulty, xemacs is, at the moment, at lost cause. My latest bete noire for emacs is my