UI, destroy the dialogue during the click on the button

Hi all

I created three buttons on my dialog box (OK, cancel, and delete). OK and cancel works very well.

How can I destroy my dialog box when you click on the button Delete?

Thank you

Shonky

Hey!

This is the same as the example of mark:

win = new Window('dialog', 'test');

win.test_btn = win.add('button', undefined, 'New Document');win.test_btn.onClick = function() {win.close(0);}win.test_btn1 = win.add('button', undefined, 'Open Document');win.test_btn1.onClick = function() {win.close(1);}

win.center();var myDlg = win.show();

if(myDlg == 0){    alert("New document");}else if(myDlg == 1){    alert("Open document");}

Hope that helps.

--

tomaxxi

http://indisnip.WordPress.com/

Tags: InDesign

Similar Questions

  • The button Reset/Restart or script

    Hi there, here once again with another Captivate 5 questinon Martin

    Im still struggling with my new project. I have prepared a few projecst of training mode for my colleagues... There are some slides with clickboxes that are part of the Quiz (awarded with points).

    I have to, somehow, after finishing project as a whole (in the end he is seen blade from a Quiz with max points, accuracy etc) Add button or script to restart the project (points to erase and restore the settings of clickboxes) for the user to be able to resume full training project.

    Can you help me? (standard quiz "button recovery" does not work)

    Thanks, Martin

    You mention that you have added the button Retake Quiz in the Quiz results slide, but attempts how have you allowed for the overall Quiz?  Have you added the button return to by setting the user allow multiple attempts at the Quiz: switch failure of dialogue screen, then click on view button back?  Or you confuse the Retake Quiz button with the touch of revision Quiz?  The names are very similar and easily mistaken at first glance.

    If you have your quiz the value that one attempt (by default), that it does not change the score, even if you do not have the buttons allows 3 attempts.

  • How to use several adf 12 shape and insert the form data in to table during the click on "submit" button

    How to use several adf 12 shape and insert the form data in to table during the click on "submit" button. Can we use several form from adf or not?

    Make sure that you dragged the VO based EO.

    Also make sure that the VO attributes based EO Updatable property.

    The query according to VO is used only to add LOV to the column of the original VO ModelId.

    See you soon

    AJ

  • How to close the default alert box that will come during the click on "back" button

    Hi all

    I develop an application that I have added basiceditfield four times on a single page, but if I pressed the device back button after having entered this field valuse is coming with an alert box save, Discard, cancel option

    I want to delete this alert message when click on "back" button

    Thank you all

    Replace http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/ui/container/MainScreen.html#o... return false (or true, does not matter).

  • How to set a value of outputText 0 during the click on the button cancel using javascript

    Hi Experts,

    JDEV version 12.1.3.0

    I have an outputText at the foot of the column. And I have a button cancel on the top of the page. Then click on the button cancel. How can I set the outputText zero value.

    Thank you

    AR

    Hello

    Please check the labour code. Make clientComponent = "true" in the output text.

    function customOutputValue (event) {}

    var buttonComponent = event.getSource ();

    Find the client component for the af:outputText 'greeting '.

    var oComponent = buttonComponent.findComponent ("ot1");

    Set the value of the outputText component

    oComponent.setValue("0")

    }

    >

    Thank you
    Amey

  • Why FF 13.0.1. destroy the bookmarks/toolbars 11.0 FF

    FF automatically upgrade my 11.0 FF FF 13.0.1. In the process, he destroyed all my favorites and toolbars. How can I get these?

    Problems with bookmarks and history does not properly can be caused by a corrupted database places.sqlite file.

    You can try to check and repair the database of places with this extension:

    Make sure the toolbars like the toolbar 'Navigation' and the 'personal bar' are visible: "view > toolbars".

    • Open the window to customize the toolbars to display the value

      • View > toolbars > customize
      • Firefox > Options > toolbars
    • Make sure the "Bookmarks Toolbar items" are on the personal bar
    • If the "Bookmarks Toolbar items" is not on the bookmarks toolbar, then FRY it in the toolbar palette in the window the bookmarks toolbar Customize
    • If the missing elements are in the toolbar palette then drag them from the window, customize the toolbar
    • If you do not see an item on a toolbar in the toolbar palette and then click the button "Restore default" to restore the default toolbar set up
  • Office jet pro 8500 a: elimination of printer, was this encrypted model? How to destroy the hard drive?

    This model encrypted?

    If this is not the case, how to destroy the hard drive? Where is the hard drive?

    Hi @Diane47,

    Thanks for joining the Forums of HP Support with your request to printer.

    I understand that you have a HP Officejet Pro 8500 has e-all-in-one printer you plan to elimination and you wonder if the hard disk is encrypted and how to destroy the hard drive. I would like to help with that.

    HP Officejet Pro 8500 has e-all-in-one printer don't have a hard drive. It contains a very small amout of memory, so it can keep in memory the printer and fax settings.

    You can clear the memory by restyoring the printer back to the default values.

    1. on the printer Panel, select Setup.

    2. from the Configuration menu, select Tools.

    3. on the Tools menu, select Restore Factory Defaults.

    HP offers to recycle their products for you. If you want to know more about it, please click here.

    Please let me know if that solves the problem, or if you need assistance.

    Indeed, if this help you to achieve a solution please click the 'accept as Solution' and the 'thumbs up' buttons down below in this message.

    Thank you!

  • PSC 750: elimination of printing, destroy the hard drive

    I have an old HP PSC 750 printer I have is going to be recycling and want to destroy the hard drive for security reasons.  Where is the hard drive and how I will destroy?

    Hello @Dotsie99, greetings!

    Thank you for visiting the Forums from the HP Support! It's a good place to find the help you need, other users, HP experts and other support staff.

    I appreciate that you try to throw your old printer and worries about the security of the data.

    You don't need to worry about your printer HP PSC 750 with no any hard drive. None of the PSC series and none of the Photosmart printers that use two or more cartridges have a hard drive.

    The printer does not store the printed pages. So please go ahead and have the printer.

    Hope that answers your questions and have a nice day!

    See you soon

    Please click on 'acceptable' on the post that solves your problem to help others to find the solution. To show gratitude for my help, please click the 'Thumbs Up icon' below!

  • BB10: Manipulate multiple click event of buttons in the PRC

    Hi guys,.

    I have a problem.

    I need to make a page with several buttons generated during execution of C++. So, I use the function QObject::connect to bound all of buttons clicked() signals to a custom location. My problem is that, inside this function of slot machine, I don't know which button triggered the signal.

    Any ideas on how I can fix this?

    Thank you!

    Hello! Use sender() function to determine the sender.

    You can also convert the sender to the button:
    Button * b = qobject_cast

  • destroy the page created with C++

    Hello

    How do I destroy a thrust from a NavigationPane page when the page is created with C++.

    Here is the code:

    // applicationui.cpp
    
    Page* ApplicationUI::doLoadPageDetails(QString fn) {
    
      QmlDocument *qml = QmlDocument::create("asset:///PageDetails/PageDetails.qml").parent(this);
     [...]  Page *newPage = qml->createRootObject();
    
      return newPage;
    }
    

    When I open the app displays a ListView. When I push on one of the elements in the list the PageDetails page is shown.

    // main.qml
    
    [...]onTriggered: {
                        var selectedItem = dataModel.data(indexPath);
    
                        var page = app.doLoadPageDetails(selectedItem.toString());
    
                        navigationPane.push(page);
    }
    

    Now, I have written a delete action in the application.cpp

    void ApplicationUI::popFinished(bb::cascades::Page* page) {
        delete page;
    }
    

    and used in the main.qml in onPopTransitionEnded:

    onPopTransitionEnded: {
            // Destroy the popped Page once the back transition has ended.
            app.popFinished(page);
        }
    

    But it's not destroy the page. Can someone tell me how to get destroyed page when you press the ButtonBack?

    The count method gave me what I expected when I start the application number is 1-> home page.

    When I click on an item on the next page open-> count = 2.

    When I come back-> count = 1.

    But I solved the problem.

    The second page is filled with information from functions in C++. So in my additional popFinished function on page "Delete" now also clear the list of contacts with the clear function, as I said before.

    void ApplicationUI::popFinished(bb::cascades::Page* page) {
        Contacts.Clear();
        delete page;
    }
    
  • pop, a page on the button click

    In my main qml Iam having a component of Naviagtion. She pushes another Qml called details page. I removed the back of the navigation pane button

    Main.QML

    import bb.cascades 1.0
    NavigationPane
    {
        property alias nav: navPane
        id: navPane
        onPopTransitionEnded: page.destroy()
        Page
         {
              Container
                 {
                    background: Color.White
                    ListView {
                        id: howToList
                        dataModel: XmlDataModel {
                            source: "models/data.xml"
                        }
                        layout: StackListLayout {
                        }
                        listItemComponents: [
                            ListItemComponent {
                                type: "listItem"
                                HowToDu_CustomListItem
                                {
                                    title: ListItemData.title
                                }
    
                            }
                        ]
    
                        onTriggered: {
                            var page = DetailPage.createObject();
                            navPane.push(page);
                            list1.select(indexPath)
    
                        } //on trigged
                    } //list view        
    
           } //main container
    
        }    //page
    
        attachedObjects: [
            ComponentDefinition
            {
                id:DetailPage
                source: "DetailPage.qml"
            }
        ]
        backButtonsVisible: false
    
    }//nav
    

    My question is:

    In the text of the page, I have a button and the click of a button I have to burst the main qml.

    DetailPage.qml

    import bb.cascades 1.0
    
    Page {
    
                Container {
    
                    ImageButton
                    {
                        defaultImageSource: "asset:///images/backArrow.png"
                        onClicked:
                            {
                              mainPage.nav.pop();
                            }
    
                    }
    
               }
        attachedObjects: [
            ComponentDefinition {
                id: mainPage
                source: "main.qml"
            }
        ]
    }//page
    

    I tried the above code. But it's not working

    What I did is:

    (1) in the main qml created an alias of the navigationPane property

    (2) in the text of the page, I added the main.qml as long as the object attached

    (3) in the click of a button detail page I used the code to jump to the page main qml below

    onClicked:
                            {
                              mainPage.nav.pop();
                            }
    

    Someone help me please

                        onClicked:
                            {
                              mainPage.nav.pop();
                            }
    

    Here, you can just use:

                        onClicked:
                            {
                              navPane.pop();
                            }
    
  • You want to change the label of the button during the treatment.

    Hello team,

    Jdev Version :--12.1.2.0.0

    My needs: -.

    I have a button with label as LOAD.

    When you click on the button, I have to call WS. But I want that during call WS my text label will go to go SEARCH the DATA LOAD.

    And as soon as his transformed my WS call it change it again to CHARGE.

    Code: -.

    < af:button text = 'LOAD' id = 'b1 '.

    actionListener = "#{pageFlowScope.LoadOperationBean.loadAction} '"

    Binding = "#{pageFlowScope.LoadOperationBean.buttonLabel}" partialTriggers = "b1" / > "

    method

    {} public void loadAction (actionEvent javax.faces.event.ActionEvent)

    Add the code in the event here...

    System.out.println ("method loadAction");

    buttonLabel.setText ("data extraction");

    AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance ();

    adfFacesContext.addPartialTarget (buttonLabel);

    setPopUpRenderCond (false);

    long startTime = System.currentTimeMillis ();

    long endTime = startTime + 30000L;

    long totalTime = 0L;

    System.out.println (StartTime);

    try {}

    Thread.Sleep (sleepTimeCount);

    long endTime1 = System.currentTimeMillis ();

    totalTime = endTime1 - startTime;

    System.out.println (TotalTime);

    } catch (InterruptedException e) {}

    e.printStackTrace ();

    }

    If (totalTime > 30000L) {}

    System.out.println ("Display Error message");

    setSuccessMessageNote (false);

    setFailureMessageNote (true);

    } else {}

    setFailureMessageNote (false);

    setSuccessMessageNote (true);

    }

    buttonLabel.setText ("LOAD");

    adfFacesContext.addPartialTarget (buttonLabel);

    }

    But I'm not able to do this.

    I also tried JavaScript and attempted to call serverListener, but who also didn't make my goal.

    Please suggest me.

    Thank you

    Céline

    Hi Celine

    Try this JS function on button click, it will change the button text when the click on and then your action will be executed

      function changeButtonText(event) {
                      var comp = document.getElementById('cb2');
                      comp.innerText = 'Fetching Data';
    
                  }
    

    Thank you

  • Fire destroyed the computer, software, documents. Adobe can have my subscription for 3 Photoshop CS4 documents?

    Fire destroyed the computer, software, documents. Adobe can have my subscription for 3 Photoshop CS4 documents?

    Adobe will honor my membership by downloading CS4 and activating the latter?

    You need to contact Adobe directly for this kind of request, but I don't hold much hope.  They no longer support the older products and are more likely to get that back here as soon as you mention nothing other than to request a reset of your activation.  If they send you back here, I recommend trying to find a member of staff and private messaging to see if they'll lend a hand.

    To the link below, click on the still need help? the option in the blue box below and choose the option to chat...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat

    https://helpx.Adobe.com/contact.html?step=PHSP-PHXS_downloading-installing-setting-up_lice nsing-activation_stillNeedHelp

  • I'm new to Lightroom CC.  It's always like that?  I click on the button import in the library module.  All the pictures shown in the display of the grid are blurred.  They are very well in simple mode.  My file extension is NAVE.   How to fix?  Any help p

    I'm new to Lightroom CC.  It's always like that?  I click on the button import in the library module.  All the pictures shown in the display of the grid are blurred.  They are very well in simple mode.  My file extension is NAVE.   How to fix?  Any help please.

    Our team is already working on this, and there will be an update to Lightroom soon with previous import window.

    During this time I ask you to please you back to the previous version of Lightroom:Instructions to restore an earlier version of update

  • CLEAR the VALUE of INPUT TEXT when the button is clicked

    Hi all

    I have a box of 2 inputText in my page in which the user enters a value, click on a button on this box. Now, what I want is to erase the other inputbox, during the click on the button against the inputBox in which the user entered value.
    I did partialTriggers of two boxes to the buttons and buttons are partial shipment.

    Now at the bean (session scope), I write something like firstInputBox.setValue(null);/firstInputBox.setValue("");/firstInputBox.setValue(false). When you click on buttons.

    But still my boxes are not erasing.

    Why can't he be?

    action listener to the button write-

    firstInputBox.resetValue();
    firstInputBox.setValue("");//if it takes a string input
    AdfFacesContext.getCurrentInstance().addPartialTarget(firstInputText);//always better to do programmatic PPR when there is some logic already on click of button .. do for declaritive ppr when ur whole soln. is declaritive
    

Maybe you are looking for