How to autoclick/run a button after Alert.Show() Event?

Hey Guys
So I have a alert.show happening for something like
public function test(evt:ResultEvent):void
if (evt.result.success == "yes")
     mx.controls.Alert.Show("Yay!!!")
if (evt.result.success == "no")
    mx.controls.Alert.Show("Nay")
Now I have another button called
<mx:Button label="Reload" id="Reload" />
I want that if the sucess == yes scenario is run.. After the popup box comes and a person click OK.. the reload button is run..
Please tell me how to do so??
Regards

You need to set up an event listener on the closeEvent.
Here is a quick example (untested):
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.events.CloseEvent;
import mx.controls.Alert;
private function init():void {
Alert.show("myText", "myTitle", Alert.OK | Alert.CANCEL, this, onClose);
private function onClose(event:CloseEvent):void {
if (event.detail == Alert.OK) {
trace("ok pressed");
} else {
trace("cancel pressed");
]]>
</mx:Script>
</mx:Application>

Similar Messages

  • How can I run a vi after deploying into a PXI Machine

    Hi;
    I am wondering if there is anyone out there who knows how to run a vi after deploying into a PXI machine from my host machine. In my application, I have some vi's that are deployed into my PXI machine. My problem is that when I would like to start these vi's simultaneously after deploying them. My current approach is to call vi reference and then invoke-> run. However, since there vi's are being deployed from a host machine and they are running in the PXI machine, I don't know how to create vi reference with the path constant. In other words, how can I find out the path of my vi after being deployed into my PXI machine from the host.
    Best Regards,
    Solved!
    Go to Solution.

    When VIs are deployed onto a PXI Real-Time controller they are generally copied to a C:\ni-rt\startup directory on the controller.
    Helpfully, this KnowledgeBase article talks about how specify and programmatically launch VIs on an Real-Time controller.
    I hope this helps,
    Fred V -- Product Support Engineer -- LabVIEW R&D -- National Instruments

  • How do I run a program after login, but before the desktop?

    How would I run a program right after the initial login using gnome/JDE?
    With CDE I could edit the ~/.dtprofile to get the desired effect, but dtprofile is a CDE configuration file.

    There used to be sn automator action that might have gotten the job done. It was on http://automatorworld.com/ but I can't seem to find it now.
    I haven't test this under Lion but there is a system preference pane called "Do Domething When" that should get the jeb done. http://www.azarhi.com/Projects/DSW/
    I have taken the opposite approach. My iTunes library and I have the same problem if it has not been mounted when iTunes launches. I created an Automator app that mounts the music then launches iTunes. Try mounting the drive the launch Automator to create the following workflow.
    1. Connect to server and select the external drive.
    2. Us the Launch Application step to launch iTunes.
    Unmount the external drive and test the workflow. If it works save the workflow as an app and use that to launch iTunes.

  • How to properly disable a button after click or can an event disable itself?

    Can I disable  MouseEvent.CLICK after I clicked it?
    I am relatively new to coding and it seems to me as a mistake that an event will disable itself?
    Is it ok or is it prone to some mistakes?
    mainNav_buttonsGroup_mc.Products_btn_mc.addEventListener(MouseEvent.CLICK, onClick_Products_btn);
              function onClick_Products_btn(event:MouseEvent) :void {
                        gotoAndPlay("products");
                        mainNav_buttonsGroup_mc.Products_btn_mc.removeEventListener(MouseEvent.CLICK, onClick_Products_btn);
      Products_btn_timeLine.play();
    The idea is that I want to disable a button after it is clicked.

    The approach will work.  The event is not disabling itself.  The event is the occurence of the CLICK interaction.  The event listener is designated to detect that happening.  The event handler function for that listener is disabling the event listener.

  • How to disable  browser back button after session logout..

    Hi;
    I want to restrict the user to use the back button after session expired or logout. By doing the session expired we are restricting the user to do any new work but I want to restrict the user to see the back pages that he surfed previously in the session.
    Is there any method to disable the browser back button after the session Expired?
    please help me to find out the solution..
    Thanks in advance.
    With Regards,
    Haramohan

    One possible way is automatic return to the current page by writing the following Javascript code to the previous page:
    <script language=JavaScript>
    function backButtonOverride(){
    setTimeout("backButtonOverrideBody()", 1);
    function backButtonOverrideBody(){
    try {
    history.forward();
    } catch (e) {}
    setTimeout("backButtonOverrideBody()", 100);
    </script>
    <%
    catch(Exception e){
    %>
    <jsp:forward page="front.jsp"></jsp:forward>
    <%
    %>

  • Acrobat 9.0 Std - How do I create a button that will show / hide the menu bar?

    In Adobe Acrobat 8, I was able to create a button that would show the menu bar using Link Properties. In version 9.0, the option I used is missing.
    The other view options are there under "Execute a menu item": View > Toolbars > File, Edit, etc.
    Any help would be greatly appreciated - thanks!

    In Adobe Acrobat 8, I was able to create a button that would show the menu bar using Link Properties. In version 9.0, the option I used is missing.
    The other view options are there under "Execute a menu item": View > Toolbars > File, Edit, etc.
    Any help would be greatly appreciated - thanks!

  • How to re-run output determination after goods issue through idoc

    Hello,
    i've got a question about output determination. We are currently in a process to automate picking, packing and goods issue through a 3rd party software. The software creates DELVRY03-Idocs including picking, packing and goods issue-information. Picking, packing and goods issue work just find and after submitting the idoc, the delivery is updated as needed.
    The problem arises when it comes to printing the shipping document on the printer belonging to the picking station that just processed the delivery. To determine the correct printer, the external software includes the picking station number inside the idoc. A user exit in idoc_input_delivery puts the number (3 digits) into likp-traid. The customizing for using this field inside output determination is complete and seems to be working.
    The problem is: as the number of the picking station is not known before goods issue, the LD00 message must not be generated before goods issue. I used the appropriate condition insinde the message scheme, the message is not generated until goods issue is complete. After processing the DELVRY03-Idoc, the message should be found and generated, but it isn't. When i take a look at the delivery after submitting the idoc, goods issue is complete, picking and packing is done - and no sign of an header message of type LD00. First i thought about a misconfiguration inside my customizing for output determination, but when i access the delivery via vl02n (change delivery), output determination seems to be processed again and without making any changes or actions, LD00 is generated and waiting for processing. After saving the delivery, LD00 is processed and the shipping document is printed exactly where it should be.
    So, as my customizing seems to work and everything else around idoc processing doesn't make any problems either, i conclude that, after processing the idoc, R/3 just needs a little kick to re-run the output determination, find the now fitting condition for LD00, find the appropriate entry in the condition table and print the document.
    I already tried report rsnast00, but this one just seems to run already created messages.
    Any ideas how to automate this little "kick in the butt"?
    Thanks in advance!

    I'm working on a similar issue with ws_delivery_update. I'm not using the IDOC as you are, but I'm using the function in a program of mine to PGI the delivery, but the output isn't being added to the delivery. I've tried to run the function twice as you suggested, but that doesn't seem to work. Do you have any suggestions or ideas on things to try?
    Thanks,
    Eric

  • How to automatically run scripts before/after scheduled backup?

    Hi, I want to run some scripts (automatically) before and after a scheduled filesystem backup using oracle secure backup. is it posible?
    thanks in advance

    I've see it: using "after backup" and "before backup" in the dataset definition.
    forget this thread...

  • How to enable Add Rule Button in ALERT configuration in RWB

    Hi All
    The Alert Configuration page is behaving strange and I am not able to create Alert Rules. The Add Rule button is disabled. The input in the page is getting reset once any user action is performed.
    Thank you
    Raj

    Hi,
    Did u check the User Roles ? Just check for that
    XIRWBUSER ROles is below;
    SAP_BC_BASIS_ADMIN
    SAP_BC_BASIS_MONITORING
    SAP_XI_RWB_SERV_USER
    SAP_XI_RWB_SERV_USER_MAIN
    http://help.sap.com/saphelp_nw2004s/helpdata/en/80/942f3ffed33d67e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/87/ca12416c17ef6fe10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d0/d4b54020c6792ae10000000a155106/frameset.htm
    Alert Config
    Alerts
    Regards,
    Moorthy

  • How to re-run payroll posting after deletion of payroll posting document

    Hi,
    Previously I have successfully run the payroll posting and posted the doc to FI. When I do a bank transfer, I found that the bank key is not properly maintained. Then I went and delete the payroll posting for 2/2011 run and reverse the posting to FI through PCP0 and delete the payroll posting document through
    I tried to rerun the payroll posting for period 2/2011 but it says no document generated.
    Can i know how can I rerun the same payroll posting for the same period again?
    Thanks

    When you are establishing the selection criteria for program RPCIPE00 (or RPCIPE00_OLD), select u201CSu201D (Creation of simulation documents) for the field called u201CType of Document Creationu201D in the Run Attributes portion of the screen. You can use option u201CPu201D (Live posting run) only the first time you post. 
    Regards,
    Howard

  • How do I run Rue Morgue after downloading it in iTunes?

    I downloaded a game on iTunes-Rue Morgue. How do I play it on my MacBookPro?

    You don't.
    It is for iPad/iPhone.
    iTunes apps are for iOS devices.
    Use the App store in the Apple menu for Mac applications/games.

  • How to call  a javascript method after the PPR event has finished  ?

    Hi!
    How can we make a javascript method get called after the processing of ADF PPR event?
    My specific use case is,
    I want to call a javascript function after the data in the table is loaded...
    In 10g, that is not a problem, as the data used to get loaded directly during onLoad, and so i would call my js function on load;
    but in 11g , the table data is being loaded through PPR which is initiated onload, and so i needed to call my function after the PPR Response processing has been done; for which I need the name of the event triggered at that instance.
    Is it possible to do this?
    Regards,
    Samba

    Hey, I got it.
    I handled the ADF Controller's PREPARE_RENDER_ID phase of the lifecycle, and then called the
    script to get Executed.
    The code :
        public void afterPhase(PagePhaseEvent pagePhaseEvent) {
            FacesPageLifecycleContext ctx = (FacesPageLifecycleContext)pagePhaseEvent.getLifecycleContext();
                 if (pagePhaseEvent.getPhaseId() == Lifecycle.PREPARE_RENDER_ID) {
                    if(AdfFacesContext.getCurrentInstance().isPostback() )
                        afterRender();
        }is written in lifecycle listener , and my backing bean extended this listener ,
    and in the afterRender() method I did this :
       public void  afterRender(){
                System.out.println("AFTER RENDER CALLED");
               FacesContext context = FacesContext.getCurrentInstance();
               ExtendedRenderKitService service = (ExtendedRenderKitService)Service.getRenderKitService(context, ExtendedRenderKitService.class);
               service.addScript(context, "translate();");
           }That's it.
    It did work, magnificently.
    Thanks for the idea.
    Regards,
    Samba

  • How can I have a button that will show/hide a text box and images on the same page?

    I have a page like below:
    I want to make so that those 3 buttons show different text under them when they are each pressed. How can I achieve this?
    Thanks.

    Hello,
    Please try using Tooltip Composition Widget to achieve that..
    You need to customize  the trigger as the button  and you can use the target to insert desired text box or images.
    you can find this in Widgets library panel > composition
    Please let me know in case you need any other clarification on that.
    Regards
    Vivek

  • How do i create a button which will show new content on same page?

    Hello,
    I hope someone can help.
    I have an image; it's a circle with different parts and different colors for each part. I inserted an image in this post.
    I want to be able to make a button out of each part (will do this with Photoshop), BUT i want to have a text shown on the right from the wheel if you click on a particle of the circle. So i don't want it to go to a new page, but i want to have a textframe to pop-up when you click. And when you click on a different part of the circle a new text will occur (and the old one won't show).
    Hope i made my question clear, english is not my motherlanguage so i'm sorry if my sentences are a bit weird.
    Thanks a lot, i hope it can be done with Muse! (This is a big part of the website.)
    best regards, bart

    Hello,
    You can achieve this using a blank compostion widget ot a tooltip widget.
    You would need to use "no fill" for the trigger containers so that they are transparent and then place them onto each portion of the image.
    Now when user clicks on that portion of the image, the trigger above it gets clicked and in a target container you can have the text displayed.
    The only issue here would be that the trigger containers would be of square/rectangular shape so you might not be able place them peroperly to cover all the sections of the image.
    Please refer to the video which might be helpful : http://tv.adobe.com/watch/muse-feature-tour/muse-trigger-target/
    Regards,
    Sachin

  • How to Make the Default Button Marker Not Show Upon Launching...

    I am trying to only have the markers show up on the menu item when you roll over it.  However, when the menu is first launched, the marker is automatically showing up on the first button.
    I have selected "None" as the default menu button in the menu config.  I am also using Photoshop to make the menu and creating the (+) buttons there.
    Any help would be greatly appreciated.
    Thanks.
    Dave

    Create an invisible button (turn off the visibility of all layers) and
    set it to use Highlight Group 2 (edit the Menu Color Set).  Set the
    opacity of all the highlight states to 0%.  Make the invisible button
    the default button.
    -Jeff

Maybe you are looking for

  • Using a variable from one class to another

    Hi ! I've a class called ModFam (file ModFam.java) where I define a variable as protected Connection dbconn; Inside ModFam constructor I said: try String url = "jdbc:odbc:baselocal"; Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" ); dbconn = DriverMan

  • "Dynamic column" in the workplace

    Hi experts. Do somebody know the possible uses of the "Dynamic column" field in the task registers of the Workflow inbox? You can add some dynamic columns via the "select layout" menu of the workplace but they seem to be empty. I'm wondering if I can

  • Philips 26PF9946/12 26'' LCD TV

    Hey all, I've found a program called DisplayConfigX that enables you to change every setting for your TV/Monitor. I was just wondering if anyone has the 'timing' settings for this make of TV (26PF9946/12) for use with a MAC MINI? Here is a link to th

  • Does creative have plans to update Nomad Explor

    i think its a great simple piece of software.. except for one thing. its hard to transfer music from your play to the PC. you have to highlite every song in the album then drag and drop them onto your PC, in a folder you have to make yourself. and wh

  • Insert Pages From another File?

    HI Everyone, Is there a way I can insert entire pages from one file into another? I'm working on a document and need several pages from another file - is there a way I can import or insert? Cheers Darryn