Must click the button twice to run the code in the Click event.

I have a button that has the following code to the click event.
_SubFormS.setInstances (0);

Last week, I added the code on the Exit of the next button event.
xfa.host.setFocus (Subf.ButtonRemove);

For some reason, I have to click twice for instance 0 value. It's never happened before. If I comment the code on the same output, nothing changes. Ideas of this weird behavior.

Thank you.

Hey, 1996

It seems to me that you have a setfocus soomehwere which is always of the substitution of the click event. For example, if you have a field that does not check if (xfa.event.commitKey == 3) before that setFocus is called, it doesn't matter what other field (or button) you click on, you will be sent to the field specified by the setFocus. 'Double click' isn't a double click, it's a click that is substituted by a setFocus (which sends you somewhere else) then a second click which is not interrupted by a setfocus, which means you can click on the button.

I don't think I have explained myself well, so here, step by step what I think is happening:

-You are currently in an area that doesn't have that a setFocus without checking the commitKey.

-You click on the button.

-Due to the setFocus, you are sent to another field that does not have the button. This means that the button never fires the click event. the second field that you are sent to has the good commitKey checks.

-You click on the new button,

-This time, because the new field that you are in control of the good commitKey, you are not sent to another discipline, and succeeded to your click.

I hope it did a good job of explaining my guess as to what is happening. Check all your output events to ensure that they all use the If (xfa.event.commitKey == 3) then bit. having forgotten one would explain why that happen all the time... it only occurs when you try to click on the button while you're in the field wihtout the cheque of commitKey.

Let me know if this is useful,

-Scott

Tags: Adobe LiveCycle

Similar Questions

  • How to add buttons in the script, and then click on run different codes?

    If we run the script, then it should display ok, cancel button 6 button. If we click on button1 coding with button1 dangerousness must be running and so on.

    Button1

    Button2

    Button3

    Button4

    button5

    Button6

    OK Cancel.

    Marie rosine

    // DialogSimpleButton.jsx
    // http://forums.adobe.com/thread/1327372?tstart=0
    // how to add buttons in script, which on click run different codes?
    
    // regards pixxxelschubser
    
    function SimpleDialog() {
    
    var w = new Window('dialog', '');
    this.windowRef = w;
    w.orientation = "column";
    
    btn1 = w.add('button',undefined,'Button 1');
    btn2 = w.add('button',undefined,'Button 2');
    btn3 = w.add('button',undefined,'Button 3');
    btn4 = w.add('button',undefined,'Button 4');
    btnOK = w.add('button',undefined,'OK');
    btnCancel = w.add('button',undefined,'Cancel');
    
    btn1.onClick = function() {alert("Button 1");};
    btn2.onClick = function() {alert("Button 2");};
    btn3.onClick = function() {alert("Button 3");};
    btn4.onClick = function() {alert("Button 4");};
    
    defaultElement = btnOK;
    cancelElement = btnCancel;
    btnOK.active = true;
    
    btnOK.onClick = function() {
        stuff = "your stuff";
        w.close();
        }
    
    w.show();
    }
    
    var stuff = null;
    SimpleDialog ();
    if (stuff) alert(stuff);
    
  • When I click on the "buy now" button for gift of my friend and itunes, it says that I must contact the support of itunes store to complete the transaction, what should I do?

    When I click on the "buy now" button for gift of my friend and itunes, it says that I must contact the support of itunes store to complete the transaction, what should I do?

    Saiyan Minion wrote:

    He says I have to contact the itunes store support to complete the transaction, what should I do?

    He said the support to contact iTunes.

  • When I press the keys on my laptop, it makes a noise? How to stop clicks. It also stops when I touch the same button twice.

    How can I get the keyboard of my Toshiba laptop to stop clicking when I press the keys.  There is also a break when I button the same button twice.  Any suggestions?

    It could be accessibility features:

    1. Press + u to open the utilities to facilitate access.
    2. Scroll down and click on "make the keyboard easier to use".
    3. Uncheck all the boxes
  • I have and try to reinstall Photoshop CS5.1 on a Macbook Pro running El Capitan (OS10.11.2). I downloaded DesignStandard_CS5_LS1.dmg but when I double-click installation I get the message 'Install' is corrupted and cannot be opened. You must eject the dis

    I have and try to reinstall Photoshop CS5.1 on a Macbook Pro running El Capitan (OS10.11.2). I downloaded DesignStandard_CS5_LS1.dmg but when I double-click installation I get the message "'Install' is corrupted and cannot be opened. You must eject the disk image. "Someone knows what's going on? I tried to download with Safari and Firefox, but the same thing happens.

    This information is a MUST to install old programs on Mac El Capitan

    -You can't get the same error message, but these two links will help with older programs

    Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)

    -also a TEMPORARY security change https://forums.adobe.com/thread/2039319

    FAQ on the Mac 10-11 https://forums.adobe.com/thread/1979303

  • By clicking on the back button twice in IE7 for previos page in our WL portal.

    Hello
    We develop applications of weblogic portal.
    And I noticed that on all our pages (we have JPF and JSR portlets) please click the back button twice in Internet Explorer 7 to get the previous page.
    We have not this problem when we use FireFox, Opera or Chrome, please advice, what we can do to solve this problem.
    Thank you very much!

    Do you mean that you still see the #id after that you set scrolling window as false and republish?

    I tried with a dummy gate and a portlet and if the property is set to true, you see the fragment identifier and if false you do not.
    Using Async desktop?

  • Problem turn off my computer. Must press the button twice

    I have a HP DC7800 computer and, after a full system rebuild some time ago, I noticed that I have to go through the process of 'disable' (via the Start button) twice before the will of computing power.  I'm sure that the computer has not always behaved this way so I think something is configured incorrectly.  Maybe a bad driver has been selected or a setting is not set correctly.  Otherwise, the computer works normally.  Can anyone offer ideas?

    I discovered the cause and thought I'd post a response so that someone else who has this problem could benefit.
    I had to rebuild this computer over the weekend and noticed that the above problem arise until I loaded Copernic Desktop Search (home).  I have now deleted and the computer has been restored to normal behavior.
    I am sure that the presence of Copernic does not introduce any other problems and can be useful to put up with the problem discussed earlier.

  • Why do I need to select the next button twice to move forward in my quiz

    I have a number of true/false and multiple choice questions in this project.  The user still has 2 attempts to get the correct answer with your comments.  When they are done with the question they are asked to select the button "next".  Selecting the next button does not advance the slide of the first time well.  You must always select a second time.  I played with adjust active and inactive times on the timeline, but that doesn't seem to have anything to do with it.  Remove the 'next' button is not an option at this stage because it is mentioned in the audio commentary for each answer to each question. Any ideas?

    If you insert a slide of questionnaire based on the model of default slides, normal stacking order is that the next button is below the Clear key. Maybe you had already removed the Clear button? Try to use Arrange to change the stacking order.

    You do not click the next button twice, you must click the button submit once, then press on Y or click the slide. If the suspension point is far from the end of the slide, it will take a while, if actions are left to "continue". Change the point to pause to be near the end of the slide.

  • problems of the admin: message saying insufficient privileges: you must be an administrator when you run this application for the first time

    I bought this new comp with windows 7 already installed. has worked fine up intill a week or two it y a. I installed a new game, and after installation, I press launch to play it and pop up with a message saying not sufficient privileges: you must be an administrator when you run this application for the first time. also, I thought that I must be the administrator when I tried to launch the disk defragmentation. my account is the administrator account so I don't understand why they say that.

    I'm sorry. I was reading through additional FAQS regarding the same problem. I saw where someone said to try to add another admisistrator account to try to take on the former. but I had no luck with this ether. I also downloaded the program of the UAC, and I turned it off, reset my computer and still no change to my problem. I also tried to download the MSE restore tool, but I found myself with a message saying that I have no MSE

    Sorry, the MSE tool is to set the MSE when its broken.
    UAC controller Tool v1.0 can be used to control the
    The UAC settings.

    However, I suggest you restart the PC and after BIOS hold the F8 key
    and when the Windows Startup Menu appears, select Mode safe mode with networking.

    Now, you will enter Safe Mode. On the page to connect, you will see the
    Standard Windows administrator click it to open a windows session, press and hold
    in mind, the password can be blank.

    Once you have done that make a new account administrator and giv it a name.
    Restart the PC. That you did this newspaper using the new account.
    Once you have done that decide what to keep with your current administrator
    account once you've done it restart the PC, BIOS hold down the F8 key and
    Select Mode safe mode with network and enter dependencies the Standard Windows administrator.

    Go to control panel-> user accounts control and security for the family-> user accounts, then
    Select manage another account. In the list, select the administrator account
    your select and then delete the account, then it will ask you if you want to keep
    files etc, it's your own decision. Itknowledge24.com

  • Change the button programmatically click event

    Hi all.  I would like to pass to the action click through my result event.

    For example, I have a table that creates buttons with a Repeater.

    Array = [{label: "Flex", action: ' navigateToURL (new URLRequest ("http://www.adobe.com/flex', '_blank'")); "" ""}, ]

    {label: 'Flash', action: "Alert.show ("I love Flash too!");"}

    And then my Repeater brings pimples like this

    < mx:Button label = "{repeater.currentItem.label}" "

    Click = "Alert.Show (Event.currentTarget.getRepeaterItem (.Act)); "/ >

    Now the above button works, but what I would like the button is the action itself, as in this example below:

    < mx:Button label = "{repeater.currentItem.label}" "

    Click = "Event.currentTarget.getRepeaterItem () .Act;" "/ >

    However, it does nothing.

    Any suggestions?  I have to be close...

    Thanks in advance!

    Hi mattcom,

    I don't think you can do it directly like that... but you can try something like this...

    Use another property in your table as shown below...

    Array = [{label: 'Flex', data: " " "http://www.adobe.com/flex: ' action: 'navigateToURL'http://www.adobe.com/flexhttp://www.adobe.com/flex},]

    {label: 'Flash', data: action "I love Flash too!": "Alert"}

    Click = "doAction (Event.currentTarget.getRepeaterItem ());" » />

    private void doAction(repeaterItem:Object):void

    {

    Switch (repeaterItem.action)

    {

    case 'navigateToURL '.

    navigateToURL (new URLRequest (repeaterItem.data, '_blank'));

    break;

    case 'alert '.

    Alert.Show (repeaterItem.Data);

    break;

    }

    }

    If you still want to go with your approach so you will have to use javascript using ExternalInterface call and send the expression in event.currentTarget.getRepeaterItem (.Act) to the javascript function, then use the Eval function, you must execute the javascript statement.

    Thank you

    Jean Claude

  • Standard button does not include the CLICK event.

    I have created a Flash presentation that includes flat standard playback > flat gray to the front and flat reading > flat gray back buttons windows > common libraries > buttons list.  These give me errors when I try to set an event handler to intercept a CLICK event of their share.  What kind ov event should I try to put in place to manage if CLICK is not an option?

    The type of event is a CLICK event, but you must use the constant MouseEvent.CLICK instead, clicking is a mouse event, so it's part of the MouseEvent class.

    Void in MouseEvent.CLICK in the statement of the auditor and (event: MouseEvent) in the listener functions.

  • The Click event component button

    Hello

    I have a custom component which is a login form. This form of connection will be muilitple useful so I don't want to set the event click on the login button in the custom component, but I want to set the click event of the button in the component of the parent of the < application > for example I want to do in MXML that I don't want to not like in the default file < application >

    Here is my custom component code is < ns1:LoginPanel id = "loginpanel1" / > at the bottom of the code below

    Default Application file
    
    
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application  xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:ns1="*" borderStyle="inset" borderColor="#B7BABC" cornerRadius="15" horizontalAlign="center" verticalAlign="top" xmlns:grc="grc.*" xmlns:events="flash.events.*">
     <mx:states>
      <mx:State name="MainApp">
       <mx:RemoveChild target="{loginpanel1}"/>
       <mx:AddChild position="lastChild">
        <mx:Label text="User Has Now Logged Inn" fontSize="30"/>
       </mx:AddChild>
       <mx:AddChild position="lastChild">
        <mx:Label id="username"/>
       </mx:AddChild>
       <mx:AddChild position="lastChild">
        <mx:Button label="Button" />
       </mx:AddChild>
       <mx:RemoveChild target="{image1}"/>
      </mx:State>
     </mx:states>
     <mx:Style source="yflexskin.css" />
     <mx:Image source="@Embed('images/engage_logo.png')" id="image1"/>
     <grc:Initialize id="remoteService"/>
     <ns1:LoginPanel id="loginpanel1" />  <<-- Here is the Custom Component I have a button called "loginButton" in the component how do I set the click event for the button from here using MXML
    </mx:Application>
    

    Thanks in advance for any help, it drives me crazy as a new to Flex, but come from a PHP back gorund. I must say I am very impressed with flex for RIA

    Concerning

    Chris

    Hello

    Manage your click event in the custom but component only to send an event to display the button click on it.


    http://www.Adobe.com/2006/mxml"width ="400"height ="300">
       
            private function clickHandler (): void {}
    dispatchEvent (new Event ('myClickEvent')):
    }
    ]]>
       

       
       
    [Event (name = "myClickEvent" type = "flash.events.Event")]
       

       
       
       

    Using the tag, you expose your custom event in mxml when you use your tag customComp in your main application.  So in your main application you can manage here


    "http://www.adobe.com/2006/MXML" layout = "absolute" xmlns:ns1 ="*" >
        myClickEvent = "myClickHandler ()"> ""
       

    In this way, you can write several event handlers for the different ways you want to when you instansiate your custom model.

    Hope that helps

    Andrew

  • I do my job to the computer on a MAC computer. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open t

    I do my job to the computer on a MAC book PRO. I want to create a document using Pages and then convert the document to PDF and send a group email. I want to send the PDF using the pdf for each receiver icon must click the icon to open the document. My problem is the document does not show the icon, but rather the document is already open. I spoke with 2 Apple. 'Experts' care and can help me. Can someone tell me what to do?

    It's a question of how the recipients e-mail programs deal with attachments. Many e-mail programs will open all the files they can handle, including files jpg and PDF, by default, and if the recipient has not changed that there is nothing you can do about it. The only solution is to the compress first, then it will be delivered as an attachment, allowing the recipient to decompress and open it.

  • Thunderbird is already running but is not responding. To open a new window, you must close the current Thunderbird process, or restart your system.

    Thunderbird doesn't start and gives this message in a message window

    Thunderbird is already running but is not responding. To open a new window, you must close the current Thunderbird process, or restart your system.

    Any help would be appreciated.

    See:

  • How can I set a password for firefox so that everyone must enter the password before running firefox

    My younger sister run my firefox just to this afternoon (she origin use IE), and she saw something that is not visible. How can I set a password for firefox so that everyone must enter the password before running firefox?

    Another option is the master password + extension.

    You must first make sure that Firefox uses a master password, for more details on how to do that see use a master password to protect stored logins and passwords. Then with the master password + extension in its options, go to the getting started section and make sure that "ask for password at startup" and "Exit if cancelled" is selected both.

    As with all extensions, this protection is quite weak and can be bypassed if start you Firefox in safe mode that disables extensions.

Maybe you are looking for

  • Why Firefox 18 behind a proxy server refuses all connections https?

    I used to have Firefox 17 and everything worked ok but I just installed Firefox 18 in my environment of Windows XP sp3 and I can't connect to https through proxy of the company sites.Company proxy requires LM/NTLM authentication, the proxy server is

  • Docking station blocked bios NB

    After connecting NB HP Probook 6550 b, docking in NB display turns off. Once removed from the NB docking station only the LED turns on, but nothing more. I have to reset the bios (take-off of the battery on the motherboard about 2 hours) and then the

  • Printer prints objects about 1 inch high on paper sticker Avery

    I set up a project using the online program Avery and my own program (Print Center Deluxe by Expert soft ware.)  Everything aligns well on the test sheet. (Ordinary paper with the positions of the various stickers printed on it). When I try to print

  • Media player on the taskbar has no icon

    Windows media player is pinned to the taskbar, but it's just an empty application icon... windows media icon is missing, and nothing that I don't seem to get it back. I can detach and repin... but it does not give the file an icon... the program in t

  • Transfer blackBerry Smartphones applications

    So, I just got a replacement for my old Bold 9700 and I used the switch device Wizard to move all my stuff from my other phone, including my third party apps. Well, now I can not find the apps on my new phone. What should I do to get back them on it?