How to get an onChange event when the user clicks a button?

Hello

I'm new to APEX and have the following problem:

Implementation:
There are two text elements, one for the zip code and the other for the city.

When you change the zip code, the city will be changed accordingly with the data from the database.

I've implemented an "OnChange" in the zip code for this element.

Problem: The on change event is executed only if the user leaves the text with a tab element or click on another piece of text.

When it hits the "next page" button directly the city is not changed.

Pointers for a solution please.


Turalf

Published by: Turalf on May 12, 2010 07:52

Well, depends on how your button is built but, in any case, Javascript supports the onclick event on the element for each HTML.
Model based buttons are often created as links using the indicator A, but which prevent you from adding an onclick on her event.
In this case you must choose if you want to cancel the default action, or you prefer to perform the default action (the doSubmit in general) as well as the onclick event.
The order of execution is
1. the onclick event
2. default action

If you return false from the associated with onclick the function Manager, the default action will be canceled if you return true, he will be executed.

Flavio

----
http://oraclequirks.blogspot.com

Tags: Database

Similar Questions

  • How to trigger DA when the user clicks a button close the standard window

    Hello!

    Apex 5.0 & universal theme.

    I want to trigger some DA when the user clicks on the button indicated to my image (button close the standard window). In fact, I would like to pass a value of my hidden form IR back and refresh IR if value = 1 or don't refresh with another value.

    Is this possible?

    Thank you.

    close_form.png

    Hi Yava,

    Seems that you have chosen to add the event handler to the page parent (the one with the IR). I think it's best. This means that the code above does not apply.

    The dialogclose event and all other dialogue jQuery UI events are triggered in the dialog box to create a DA pull on the IR will not work (because the dialog box is outside the IRR while she bubbles it won't go through the SORTING). You must handle the event on the body. This works because the event propagates to the body. Set the Type to choose to be "jQuery Selector". JQuery Selector enter 'body' (without the quotes). The event you want to handle is a custom, event which means that this isn't one of those in the select list. For event, choose "Custom". Then enter Custom Event "dialogclose" (without the quotes). Now you have a DA who fires when * all * dialog closes. You may or may not need to get more selective than that. For action, you can use refresh as you do already.

    Kind regards

    -John

  • How can I stop a slide until the user clicks a button?

    I would like to pause a slide until the user clicks on a button (that I created on a Smartshape). The thing is that I have not added a box of click on the smartshape object but have only together properties smartshape to 'use like Button '. If I add a clickbox object, I would get a ' project Pause until that the user clicks on ' in the section property options. However using a smartshape as a button, I can't find this option. I use 6 Captivate. It seems strange that I expect to see the same checkbox option, even if I had to use a smartshape as a button but I did not. Can't someone help me and let me know if I'm missing something.

    Of course, I could use a clickbox on my smartshape to achieve what I want, but I want to avoid this for two reasons:

    1. I want to avoid adding another object when I don't need.
    2. My smartshape is a right arrow (indicating 'Start'), and I'm not a square box sitting on top of a triangle, click because it shows just the hand pointer even if the cursor is not exactly on the arrow button as it enter the clickbox area.

    Thank you

    Sean

    Click the smart shape, go to properties > accordion Timing > Pause after and determine the number of seconds since the start of the slide to break him.

  • How to hide images that appears only when the user clicks a button?

    Hi, I am doing an application which includes maps, and I want the cards to be hidden until the user presses the map icon. How could I get there. I created buttons when pressing on the icon directs the user to a different page, but they can also simply scroll down to see the map. I would rather just the card face down until the button is pressed.

    Oh and if I can do it with an image can I do with a separate show? I'm including maps and routes photo step by step. for example, a button to make the pop up card and another button to bring up the slideshow.

    Any suggestions? Thank you!

    It is best done with a multi state object.

    One is the map icon and the rest of the States put in place according to the needs. Use the buttons in the various States by using the go to the action of the State.

  • How to make a text field required at run time when the user clicks on the box?

    I had a form, there are several checkboxes fields and the text associated with the check boxes. If the use clicks on the checkbox then partner

    text fields should become mandatory. I tried the change event and the click event of the boxes. There is error in the onChnage event and I got some odd results in the click event on. Sometimes, if the user clicks the check box, then for the 1st time the field is not required, then the user onclicks the box and when the user clicks the check box for the second time the field becomes necessary, but if I turns off the option highlight the field and selects the field becomes necessary even if the user onchecks I am totally confused! To add that I have also written an incorrect code always I reached the goal? How it can be possible. I write the codes below, please help me because I am working under a deadline from the client.

    onChange event:

    var = this.boundItem (xfa.event.newText) newVal;
    if(newVal == 0)
    {
    xfa.resolveNode ("form1. Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1'). validate.nullTest = "disabled";
    }
    on the other
    {
    xfa.resolveNode ("form1. Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1'). validate.nullTest = 'error ';
    }*/

    For the onClick event:

    var a = xfa.resolveNode ("form1..") RawValue Subform0.Subform1.Subform9.Subform10.Table48.row2.CostItemRecovere d_OnlyEnergyCharges");
    App.Alert (a);
    if(a == 0)
    {
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck__L1_1").validate.nullTest = 'error ';
    }
    if(a == 1)
    {
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck__L1_1").validate.nullTest = "disabled";
    }

    Please help someone!

    Hello

    You may need this resolved at this point, but here are a few tips.

    An example of a loop in a dynamic array is here: Re: how to make invisible/visible or hidden columns with checkbox?

    You are usually not necessary to resolve the nodes, especially when the script object is in the same table as the target objects.

    For example if the table was not static your script could be simplified:

    if (this.rawValue == "1")  // this object is in Row2
    {
         Row4.ComplianceCheck_L1_1.mandatory= "error";
    ...
    }
    

    However because you will be to loop through all the rows in the table repeatable instances / then you need to resolve the nodes. Take a look at the example above.

    In your script, you have to Row8 Row4. I don't know if this is repeatable or just some of them. If we take Row4 as being repetitive, then you can apply the following to all repeatable lines.

    var vRow4 = Table48._Row4.count;
    console.println("Row4: " + vRow4); // You can delete this or comment it out after testing
    
    if (this.rawValue == "1")  // this object is in Row2
    {
         for (var i=0; i
    

    I have not tested, but it should be close to work.

    Good luck

    Niall

  • How to stop going backwards when the user click on bar train ADF

    Hi all

    I use the Train of the Adf. and I would like to know how to get the following scenarios

    When the user click on step backwards train by train bar, I like to do validation and don't let go without validation.


    With respect,
    WP

    Hello

    ADF Code corner (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples) will have a solution as sample 97. It will probably come out tomorrow

    Frank

  • How to make only two columns as editable in five online when the user clicks a line using adf 12.1.3.

    Hello

    I displays a table on the screen. This table is read only during the initial page load. I want to do only two columns as editable on five in a row when the user clicks a line using adf 12.1.3.

    Is it possible in the adf. If possible how to handle this. Please help on this.

    For example, drop table editable Full and then replace rest inputText (components entry in general) with af:outoutText, everything except those two.

    And use the clickToEdit feature...?

  • How prevention JButton to actions generated when the user press down

    How prevention JButton to actions generated when the user hold down the key or the short cut
    The code below to show the question when the user keep pressing Alt O
    We want to stop the JButton to generate multi shares just a share only
    A code example shows the behavior that needs to be prevented. Keep pressing "Alt + O" and you will see that the standard ouptput will print the timestamp
    Note Please, I'm NOT interested in the mouse press which is a solution by adding a threshold (setMultiClickThreshhold (long line) on the JButton as an attribute.

     
    public class TestPanel extends JPanel
    {
    
       private JButton btn;
    
       public TestPanel()
       {
          btn = new JButton("Open");
          this.add(btn);
          registerCommand(new MyAction(), InputEvent.ALT_MASK,
                KeyEvent.VK_O, btn, btn.getText(), 0);
       }
    
       public static void registerCommand(AbstractAction action,
             int mask,
             int shortCommand,
             JComponent component,
             String actionName,
             int mnemonicIndex)
       {
          InputMap inputMap = component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
          KeyStroke knappKombination = KeyStroke.getKeyStroke(shortCommand, mask);
    
          if ((component instanceof AbstractButton)
                && mnemonicIndex >= 0
                && mnemonicIndex < actionName.length()
                && (shortCommand >= KeyEvent.VK_A && shortCommand <= KeyEvent.VK_Z))
          {
             ((AbstractButton) component).setDisplayedMnemonicIndex(mnemonicIndex);
          }
    
          if (inputMap != null)
          {
             ActionMap actionMap = component.getActionMap();
             inputMap.put(knappKombination, actionName);
             if (actionMap != null)
             {
                actionMap.put(actionName, action);
             }
          }
       }
    
       public static class MyAction extends AbstractAction
       {
    
          /**
           * 
           */
          private static final long serialVersionUID = 1L;
    
          @Override
          public void actionPerformed(ActionEvent e)
          {
             System.out.println(System.currentTimeMillis());
    
          }
    
       }
    
       public static void main(String... args)
       {
          SwingUtilities.invokeLater(new Runnable()
          {
             public void run()
             {
                JFrame frame = new JFrame("Testing");
                JPanel panel = new TestPanel();
                frame.getContentPane().add(panel);
                frame.setPreferredSize(new Dimension(500, 500));
                frame.setMinimumSize(new Dimension(500, 500));
                frame.pack();
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.setVisible(true);
             }
          });
       }
    
    }
    Published by: user12130673 on 13-feb-2013 03:01

    Use getKeyStroke (int keyCode, int modifiers, boolean onKeyRelease) hit with onKeyRelease = true instead?

  • How to display a drop-down menu when the user clicks on a point on lineseries?

    Hi all

    I am new to flex development.

    I watch the series online on the Board, I would like to give a response when the user clicks on the "point" on the line, I want to display a menu drop down and react to the choice of the user on the menu item.

    Is this feasible? Any sample or reference?

    Thanks in advance.

    Jack

    I prefer to use itemClick localX or stageX, according to me, one of these will help you get what you want.

  • How to put in pause/playback my project when the user clicks?

    Hi all

    I'm working on a project using Cp4.

    My project plays automatically without user intervention.

    I need project to be suspended when the user clicks a clickbox running.

    I can break the project by adding a clickbox and applying the property ' to pause project until user clicks on

    But it must be a user interaction whether to pause or play.

    I use playback controls by hiding all the options to control playback bar red break and play option, but I need to pause the button inside the project.

    I dnt want to display playback controls by using the Table of contents.

    __________________________________________________________________

    I could find this content at http://help.adobe.com/en_US/Captivate/4.0/Using/WSCB934979-86BE-40d2-8BB8-A66956575988.htm l #WS8898B608-FC25-4439-BABC-3AD722144202

    ad.gif

    In this page, it clearly says that we can break the project if we set the value of the variable 'rdcmndPause' to 1.
    In this page, it clearly says that we can play the project on hold if we set the value of the variable 'rdcmndResume' to 1.

    But I applied the same values for these variables and tried to control my project its does not work.

    Kind regards

    Kartik.P

    Hello

    Maybe the link below will help?

    Click here to see

    See you soon... Rick

    Useful and practical links

    Begin to learn Captivate 5 times now! $29.95

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcererStone blog

    Captivate eBooks

  • Can I interrupt my project when the user clicks?

    Hi all

    I'm working on a project using Cp4.

    My project plays automatically without user intervention.

    I need project to be suspended when the user clicks a clickbox running and needs to play when the user clicks on the same clickbox again.

    I can break the project by adding a clickbox and applying the property ' to pause project until user clicks on

    But it must be a user interaction whether to pause or play.

    Is this possible? How could I do my work?

    Kind regards

    Kartik.P

    Hello

    Maybe I missed the original request, but if you just want to users the ability to stop/start your project at a time that suits them... have you considered reading control options? It is a simple option that allows the user to pause/run the slide as they wish...

  • Report - Warning Message When the user clicks on the link with the value 0

    Hello

    I have a report with several areas, for example. Year, high priority project manager, County of medium priority project, project manager of low priority.
    I used column attributes to bind the data of the report on page 22.



    Now, some cells in the report have 0. Isn't it possible that when the user clicks on 0 binding doesn't to page 22, but see the window alert javascript indicating no data.


    Any help will be much appreciated.


    Kind regards
    Shijesh

    You can take a look at the following page

    http://HTMLDB.Oracle.com/pls/OTN/f?p=31517:228

    to see how this is possible.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • Is there a signal when the user clicks the overflow (3 points icon) on the actionbar button?

    Hello world

    Is there a signal when the user clicks the overflow (3 points icon) on the actionbar button? I would like to receive this signal (and signal when the overflow menu is closed) in order to modify the list of action items.

    Thank you very much

    -tom

    actionMenuVisualStateChanged is what you are looking for

  • Make the text appear in the box when the user clicks on the part of an image

    Is there an easy way to do this in the Muse?

    (1) do different areas of an image map.

    (2) automatically type the letter 'A' in a text box when the user clicks the area 'A' and so on.

    Thank you!

    Essentially, you want a keyboard on the screen? This is not possible with the standard tools of Muse. It would be quite simple with Javascript, however.

    David

    Creative muse

  • Disable the first/previous/next/last buttons when the user clicks on the button "create".

    Hello

    I have a requirement to disable the first/previous/next/last buttons when the user clicks on the button "create". The must be enabled after the user clicks on the submit, and then the button "validate".

    Is this possible please?

    Thank you.

    Hello

    Using BC4J in the model layer? If so, you might use an EL to the property of disabled button. Something like

    
    

    Replace in the binding attribute on your page (preferably the primary key of your form attribute).

    Arun-

    Edit: Check out this blog for more information on this EL: https://blogs.oracle.com/adf/entry/highlighting_new_rows_in_adf

Maybe you are looking for