UI, destroy dialog on click of button

Hi All,
I have created three buttons on my dialog (OK, Cancel and Remove). OK and Cancel working fine.
How can I destroy my dialog on click of Remove button?
Thanks,
Shonky

Hey!
This is same as Marc example:
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/

Similar Messages

  • In File Dialog, when click Cancel button, it prompts error and VI exits

    Does anyone can give me an idea on how to solve this problem? When the user click on the Cancel button in the File Dialog box, it prompts out error and says "Operation canceled by user". How can I handle this error?
    I got the same error when I click on the Cancel button when the system prompts me for replacing an existing file. Btw, how can I stop the system from prompting me to replace an existing file? Thankssss.....

    Hi,
    A similiar topic was discussed here
    http://forums.ni.com/ni/board/message?board.id=170&message.id=151316#M151316
    Hope it helps

  • How do we update the value of a textfield in a dialog box by clicking a button/ textbutton ?

    How do we update the value of a textfield in a dialog box by clicking a button/ textbutton ?

    Hi,
    If you create a function to return wwctx_api.get_user you could
    call this inside an update trigger, you could put in an
    exception to return USER if there is an error, this would then
    work for users connected directly and users using Portal.
    Regards Michael
    e.g.
    CREATE OR REPLACE FUNCTION F_PORTAL_USER RETURN VARCHAR2 IS
         vRet VARCHAR2(50) := wwctx_api.get_user;
    BEGIN
         RETURN(vRet);
    EXCEPTION
         WHEN OTHERS THEN
              RETURN (USER);
    END F_PORTAL_USER;

  • Prevent show 'select download folder' dialog when click export csv button in a flash-based website

    I want to download csv file from a flash-based website. When i click the button with export icon, Firefox always pop up dialog box with title 'select download folder for ...'. I have set up default download folder and uncheck 'always ask me where to save files'. If i download from other websites (not a flash one) then the download automatically started without pop up folder selection dialog. I want to prevent firefox from showing download folder selection dialog because i need to use it for web automation. by the way, i use ubuntu 12.04 with firefox 21.0. I have used flashgot extension but still no luck. Any suggestion about this?

    I already have followed the instruction above, but still no luck. The dialog still appear. I think this is not a regular download link since it's made with flash. It's look like an export button which will force browser to pop up 'select folder location' dialog and when i click save then there is no download progress like usual, the file just saved automatically. I think the file itself is rendered when the flash website loaded, and then embeded into the web page. When i download, it didn't send any request, it just get the embeded file.

  • Close Popup on clicking OK button of Information Message Dialog

    JDev 11.1.1.5.0 ADF BC
    I have a popup and a dialog inside it where user inputs some data and clicks Save button.
    I am showing an Information message on click of Save on successful insertion of data into the database.
    What I am looking to achieve is that I want to close the popup window on click of the OK button which is inside the information message dialog that is been shown on successful Saving of data.
    There is already a similar thread Close popup in adf but that doesn't have a correct answer.

    1) Bind the main popup to a bean variable:
    <af:popup id="mainPopup" binding="#{MyBean.myPopup}" ...>
    public class MyBean
      private RichPopup myPopup;
    }2) Add a DialogListener to the <af:dialog> of the information message:
    <af:popup id="infoPopup">
      <af:dialog dialogListener="#{MyBean.infoPopupDialogListener}">
        ... Info message here ...
      </af:dialog>
    </af:popup>3) Use this DialogListener to close the main popup programatically:
      public void infoPopupDialogListener(DialogEvent dialogEvent) {
        myPopup.hide();
    }Dimitar

  • Thanks For Your Support in advance i want to know that when I open a website that time view print option and when I click close button then page also new window page also close. I want to copy it how i can stop this print option?

    WHEN I OPEN A URL THAT TIME WITH PAGE OPEN SHOWS PRINT OPTION AND WHEN I CLICK CLOSE BUTTON OF PRINT OPTION THAT TIME NEW WINDOW BUTTON IS CLOSED. I WANT TO CLOSE ONLY PRINT OPTION. PLEASE HELP ME...............THANKS

    Many sites which offer specific "print formatted" pages do that: they assume that once you have finished with the print dialog you no longer want the page itself. So for your convenience they close it. Not so convenient for you, since you still want to view the page.
    I'm not aware of an easy solution for this. I can think of a couple different approaches.
    First, maybe there's an add-on to solve this? That would be easiest.
    Second, maybe there's a userscript to solve this?
    The Greasemonkey add-on runs userscripts which you can copy or download. Be careful to install only long-establish and trusted scripts. (''Is there a site that has this bad behavior that I can view without logging in? I will test one of my existing scripts to see whether it helps.'')
    Third, Firefox has an old system for restricting site permissions in a custom text file in your profile folder (named user.js). Editing this file is a bit advanced, and I haven't been able to test it, but the system works along these lines:
    <br>// Define a policy name for window.close permission
    // (assumes you don't have this pref already)
    user_pref("capability.policy.policynames", "nowindowclose");
    // Define policy: disable sites from using window.close
    // in their scripts
    user_pref("capability.policy.nowindowclose.Window.close", "noAccess");
    // List of sites subject to this policy
    user_pref("capability.policy.nowindowclose.sites", "firstbadsite.com secondbadsite.com");
    Again, I haven't tested that and recommend looking into add-ons first.

  • Add Subform dynamically,on click of Button, in Interactive form generated by Adobe Document Services

    HI,
    I have an XDP file designed by Adobe Designer 7.1 with the following hierarchy of elements:
    -form1(root)
    --Button
    --tmpForm (subform - Repeat subform for each data entry )
    ---ST (Text)
    Now, this XDP file generates an Interactive PDF form with Reader Rights enabled by the Adobe Document Services.
    On click of button, the following javascript is executed on client side:
    var df = _tmpForm.addInstance(1);
    df.ST.rawValue = "HI" ;
    xfa.host.messageBox( "Instances" + tmpForm.all.length ) ;
    On clicking the button, i get the length of the instances of the subform and the size increases on each click, but no element is added "visibly" to the pdf.
    But when i try to do the same by saving the XDP file as Dynamic PDF form for Acrobat 8.0,and open it using Adobe Acrobat PRO 8.0, it works fine.
    My question is,I s it not possible to add subforms dynamically in PDF's generated by Adobe Document Services with Reader Rights enabled?
    Or, is there something that i am missing?
    Please guide.
    Thanks.
    Regards,
    Siddhartha

    Hi,
    you can't change the behavior of the save button in the browser nor in Reader/Acrobat.
    You can add a custom button within your form which calls a custom script from a folder level script using the browserForDoc method.
    The browseForDoc methos is the only one whcih can change the name in the saveAs dialog.
    Here's an example., you can run from Acrobat console.
    You need to combine it with the solution from the other thread to make it work with your form.
    http://forums.adobe.com/message/2266799#2266799%232266799
    var oRetn = app.browseForDoc({
        bSave: true,
        cFilenameInit: "MyForm.pdf",
        cFSInit: "",
    if (typeof oRetn !== "undefined") {
        this.saveAs({
            cFS: oRetn.cFS,
            cPath: oRetn.cPath,
            bPromptToOverwrite: false

  • Click a button,a selection-screen box come out

    hi experts:
        when I click one button in the dialog screen,a selection screen come out,I can input the
    parameters.how it come true?thanks!

    this can be achieved using Sub selection screen. steps are following
    define screen fields and function keys.
    SELECTION-SCREEN FUNCTION KEY 1.
    SELECTION-SCREEN FUNCTION KEY 2.
    SELECTION-SCREEN FUNCTION KEY 3.
    define sub screen and give it a number.
    SELECTION-SCREEN BEGIN OF SCREEN 0001 AS WINDOW TITLE I000 .
    SELECTION-SCREEN BEGIN OF BLOCK L001 WITH FRAME TITLE I001 .
    PARAMETERS S001 AS CHECKBOX DEFAULT ' ' .
    PARAMETERS S002 AS CHECKBOX DEFAULT ' ' .
    PARAMETERS S003 AS CHECKBOX DEFAULT ' ' .
    PARAMETERS S004 AS CHECKBOX DEFAULT ' ' .
    PARAMETERS S005 AS CHECKBOX DEFAULT ' ' .
    PARAMETERS S006 AS CHECKBOX DEFAULT ' ' .
    PARAMETERS S007 AS CHECKBOX DEFAULT ' ' .
    SELECTION-SCREEN   END OF BLOCK L001 .
    in the At selection screen event give in the case statements your desired screen
    AT SELECTION-SCREEN.
      CASE SSCRFIELDS-UCOMM.
           WHEN 'FC01'.
          IF SY-DYNNR = 1000.
            CALL SELECTION-SCREEN 0001 .
          ELSE.
            PERFORM MARK_VARS USING 'X' 'A'.
          ENDIF.
        WHEN 'FC02'.
          IF SY-DYNNR = 1000.
            L_INTERACTIVE = RS_C_FALSE.
            SSCRFIELDS-UCOMM = 'ONLI'.
          ELSE.
    in the At selection screen ouput even give names to your function keys (Logic may be different from what i have shown)
    AT SELECTION-SCREEN OUTPUT.
      IF SY-DYNNR = 1000.
        MOVE 'Fld Selectn for Output' TO SSCRFIELDS-FUNCTXT_01.
        MOVE 'Execute in Bckgrnd' TO SSCRFIELDS-FUNCTXT_02.
        MOVE 'Execute + Debug' TO SSCRFIELDS-FUNCTXT_03.
      ELSE.
        MOVE 'Select all' TO SSCRFIELDS-FUNCTXT_01.
        MOVE 'Deselect all' TO SSCRFIELDS-FUNCTXT_02.
        MOVE 'Highlght all key figs' TO SSCRFIELDS-FUNCTXT_03.
        MOVE 'Select All Characteristics' TO SSCRFIELDS-FUNCTXT_04.
        MOVE 'Select All SID Fields' TO SSCRFIELDS-FUNCTXT_05.
      ENDIF.

  • Click radio button with Apple Script

    I have something like this going on at the moment:
    tell application "Adobe Reader"
           activate
    end tell
    tell application "System Events"
           tell process "Adobe Reader"
                  click menu "file" of menu bar 1
                  click menu item "Print..." of menu "file" of menu bar 1
                  click radio button "pages" of window "Print"
                  --click button "Printer..." of window "print"
                  --click menu button "PDF" of window "Print"
                  --click menu item "Save as PDF…" of menu 1 of menu button "PDF" of window "Print"
                  --keystroke "D" using {command down, shift down}
                  --keystroke "G" using {command down, shift down}
           end tell
    end tell
    How do I click the radio button "Pages" in the print dialog box under "pages to print" with applescript?
    Thanks

    I ended up using key codes to tab using control down to get to it, which works for me.

  • How can i uncheck a checkbox in table component on clicking a button

    In my application I have a table component that display data from the database and a submit button outside the table component, the first column in the table component is a checkbox, How can i uncheck the checkbox in the table component when the submit button is clicked?
    Thanks in advance.

    Something like this ... I THINK it will uncheck all checkboxes in table, but I'm not positive ... you can test!
    if checkbox id is checkbox1...
    <script type="text/javascript"><![CDATA[                                         
    function disableCheckbox()
    document.getElementById('form1:checkbox1').selected = false;
    }]]></script>Put above code inside of head tag in JSP View
    NEXT...
    go to Design View and select your button and go to properties section and select onClick property and insert this javascript in dialog...
    setTimeout('disableCheckbox()', 1)Now run the project when you click the button does the checkbox become unselected?
    Anyway this is where I would start...as far as selecting just the first checkbox if there is more than 1 record...I'm not sure...but I'm curious if this works.
    Jason

  • Event handling while changing the value or clicking the button

    Hi All,
    I am working on Jdeveloper 11.1.1.5.
    I have a must requirement where i have a textbox and a button.
    Now if a user changes the value of the textbox then i need to show a dialog to the user for the confirmation that whether he wants to continue or not.
    And on click of button i execute my business logic and commit in the database.
    NOTE :- I am opening that dialog on the valueChangeEvent of the textbox.
    Case 1 :-
    User enter a value in the textbox and tab out the field , value change occurs and dialog displayed onto the page. -> CORRECT
    Case 2 :-
    User enter a value in the textbox and does not tab out the field and directly click on the button.In that case , actually valueChange and button code both executes at the same time.I mean to say , the user click on the button , i get the dialog , but my business logic also gets executed. -> INCORRECT(ISSUE)
    How should i restrict the button logic to be executed till the dialog has been shown and user has confirmed.
    Kindly suggest!!!
    Regards,
    Shah

    Hi Shah,
    You can try something like this:
    <af:inputText autoSubmit="true" id="it1" ...>
      <af:setPropertyListener from="true" to="#{viewScope.uncommittedData}" type="valueChange"/>
    </af:inputText>
    <af:commandButton partialTriggers="it1" disabled="#{viewScope.uncommittedData ne 'true'}" .../>AP

  • dvt:hierarchyViewer make error popup close without clicking ok button

    Hi All,
    I am using Jdev 11.1.1.3.0
    In my page I have 2 region, one contains a form which built from a EO Based VO and a commit button. Another region have a <dvt:hierarchyViewer> which is built from another VO to display some hierarchy diagram.
    In my page user can edit some information and commit the transaction by clicking the commit button.
    Whenever there is some validation fail in the model layer for the information that user edit, I will use below code:
    throw new JboException(error_message);
    which ADF will handle it as a popup with the error message and display on the UI.
    So now the issue is, whenever I click commit button, region that contains <dvt:hierarchyViewer> will shows as "Fetching Data...", and if there is anything failed for this transaction, error popup will appear. However, the popup will not stay and it will disappear even without user clicking ok button whenever <dvt:hierarchyViewer> finish fetching data and display the content. So this is a problem because error message will only display 1 second then it will disappear, user cannot even see what is the error.
    If I set render property of <dvt:hierarchyViewer> to be false, now if there is error, the popup will stay there until user click ok button to close it. So the issue definitely related to <dvt:hierarchyViewer>.
    My question will be why rendering <dvt:hierarchyViewer> will impact the error popup and make it disappear? And based on my observation, the issue only happen on IE but not on firefox.
    Hope anyone can help me with this issue.
    Thanks.
    Pei
    Edited by: user10867484 on Jun 16, 2011 5:25 PM

    Hi,
    So the issue definitely related to <dvt:hierarchyViewer>
    Your observation is correct, the conclusion you take out of this not. The hierarchy viewer fetches data asynchronously and at the end refreshes the component, which takes the focus out of the dialog into the page. The default behavior of the popup component is to dismiss when the focus is lost. The options to try and handle this are
    1. make sure the commit button has "partialSubmit=true" set so it does not refresh the page and thus the hierarchy viewer as a whole
    2. configure the af:messages component to show error messages inline and not as a popup
    I would go and try 1 first
    Frank

  • Lightroom freezes when i click import button

    how do i keep lightroom from freezing when i click import button. right now it is worthless. adobe technical support is no help

    F. McLion wrote:
    You are copying the photos. Does LR have the permission to delete the files from its source location - as DdeGannes suggested? Maybe this dialog is misleading.
    Did you try to just add files copied to the destination before - just for finding the issue?
    If nothing helps: Any chance you can upload one of the jpg to some file sharing service so we can have look at it?
    I believe DdeGannes suggested permission on the Destination folder (not the source folder).  Performing a copy requires only Read&Write permission on the destination folder, not the source folder. You need to go into your operating system and change the permissions to Read&Write on the destination folder. (If you don't know how to do that, go to your favorite search engine and type in Change Permissions Mac)

  • HT201209 Trying to redeem a free download for a song from KLove. When I get into my acct & try to redeem it, it just keeps bringing up the "sign-in" box. When I click the button on KLove's webpage to redeem it takes me to that page but does the same thing

    Trying to redeem a free download for a song from KLove. When I get into my acct & try to redeem it, it just keeps bringing up the "sign-in" box. When I click the button on KLove's webpage to redeem it takes me to that page but does the same thing

    Get the redeem code from the KLove page:
    http://www.klove.com/music/store.aspx
    ...and enter it into the Redeem Code box in the iTunes Store.
    You will have to sign in to your iTunes account.
    It worked fine here.  If that doesn't work for you, let us know what went wrong.

  • Was typing an e-mail -trying to find "printer" - clicked SOME button now can't get back to my e-mail also top of page is missing/can't get to go down

    Went thru mozilla to business e-mail account/wanted to make a copy of notice to be sent/was clicking different buttons to find a "printer" all of a sudden the whole page went up and the top (bar,browser,everything disappeared) now can't find anything of mine only info to download mozilla??

    That was helpful but it didn't solve the problem. There were two red dots, now only one, though I copied and pasted the same password in both places. (I don't recall having to change the password in two places before).
    The red dot next to smtp.mail.me.com:(myname) disappeared
    The red dog next to smtp.me.com:(myname) is still there. It says, "trying to log in to this SMTP account failed. Verify that the username and password are correct."
    Thanks,
    Lizzy

Maybe you are looking for

  • Adobe Reader XI

    Is anybody else having a problem with Adobe Reader XI crashing immediately after opening a PDF file?   This is happening to me today for no apparent reason (everything was fine yesterday).  I have tried unistalling and then reinstalling but to no eff

  • Problem in printing of MB51in quantity field

    Hi All I am getting diffrent symbols overlapping the fileds like ////// ; XXXXXX ; /\/\/\/\/\ . The fileds are Quantity in unit of entry, unit of entry and ammount in local currency. I am facing this situation when printing material documents through

  • Why is my color picker not showing up in the gradient panel?

    When I try to change the colors to a gradient I am not able to change the selected color. When I double click on the color slider I want to change, the pop up panel gives me grayed out CMYK sliders. And all of the fill and stroke icons go dark and di

  • JSP and PHP ?!

              is it possible to include a php file into a JSP with the include tag?           infos:           the php file is on another server as the jsp file.           the php server doens'nt support jsp and vice versa.           hope anyone can help

  • Aperture does not show my Photostream adjustments

    I know that everything involving Aperture, Photostream, etc are all up in the air for the time being (or at least until Yosemite/Photos are released) but I was wondering if I was missing something. When I take a photo on my iPhone 6 (obviously runnin