Close window on click of a button

Hi all,
I am developing an application in which there are some checkboxes with a button on the window. When we choose these checkboxes (one or more) and click on the button it opens another window which has some textfields and one button. These textfields are for taking certain parameter to run a process which will be called when the button on second window is clicked.
Now my problerm is that i want to make the second window closed on click of button on second window. But i m not getting the solution.
This may be a stupid question but as I m new to this field I really need help.
Thanks for any response.

i want to make the second window closed on click of button on second window. But i m not getting the solution.Put following in the button action listener:
secondWindow.dispose();
//OR
secondWindow.setVisible(false);Thanks!

Similar Messages

  • Destroy Portal Window on click on Logoff button

    Hi Experts,
    My requirement is a simple one. I simply need to destroy the portal window on click of logoff button. Initially i followed a few blogs and did the following.
    Created an HTML KM document and copied its link under the ume.logoff.redirect.url property. But this link is getting appended twice when i click the logoff button.
    Please let me know if there is some other way or if I need to make changes in the current approach. We access the portal within our own network i,e intranet.

    Hi Kaustubh,
    Below is the way we did -
    Create a logoff.html and place it inside km at any folder location. make sure everyuser group has full permission to this km folder. below is the code -
    use html head and start script language then -
    function closeWindow()
            window.opener = top;
            window.close();
    end script language
    call onload closewindow
    end body and end html.
    now, open visual admin and goto propery name - ume.logoff.redirect.url and write property value as -
    Property Value =
    http://<Server hostname:port>/irj/go/km/docs/.../.../logoff.html
    and restart the server.
    hope it helps.
    Regards,
    Sen

  • Closing a Pop Up Window on click of a button

    Hi Forum,
    In the parent view there is a button, on click of this button a new pop up window is opened.
    This pop up window also has a button (Submit). Onclick of the submit button in pop up window I need to performe some code execution and then close this pop up window.
    I tried the steps given in the weblog
    /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications
    But it does not seem to be working.
    Any other way to achieve this or what might I be doing wrong here?
    Thanks,
    Anubhav.

    Hi,
    I missed a parameter in parent window while calling the pop up window
    DATA lo_window_manager TYPE REF TO if_wd_window_manager.
    DATA lo_api_component  TYPE REF TO if_wd_component.
    DATA lo_window         TYPE REF TO if_wd_window.
    lo_api_component  = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    lo_window         = lo_window_manager->create_window_for_cmp_usage(
                       interface_view_name    = 'WD_VALUE_HELP'
                       component_usage_name   = 'ZUSAGE_FORMNUM'
                       title                  = 'Additional Information For Item'
                      close_in_any_case      = abap_true <----Missed this earlier
                       message_display_mode   = if_wd_window=>co_msg_display_mode_selected
    lo_window->open( ).
    Now it is working fine.
    Many thanks to all.

  • Invoke a method when Close Window is clicked

    Hi,
    How do i invoke a method when "close window" on the global button bar is clicked.
    Can someone please help.
    Thanks in advance.
    Pavan
    Edited by: user12215240 on Feb 23, 2010 9:32 AM

    Is it possible to change the settings so that when the red 'close' button is clicked, the application will hide instead of closing?
    Applications don't "close," windows do. If you are just closing windows but not quitting applications that opened them, it is no wonder that there are hundreds of apps in the Dock.
    A few apps like System Preferences have only one window, so they automatically quit when you close that one window. Most apps do not do this: even after all their windows are closed, they remain running & thus show up in the Dock, in Activity Monitor, & so on. They each require a little (or sometimes more than a little) real memory reserved for their use to remain running -- this subtracts from what is available to do useful tasks, & will slow down your Mac when it results in too much virtual memory use.
    Thus, it is a good idea to quit applications you don't have an immediate need for, especially if they don't require long startup times. If you want easy access to select applications, create a folder & fill it with aliases to those apps, then drag that folder to the right side of the Dock, where it will create a stack. When opened, the stack will allow one click launching of those apps.

  • Finder stops responding. Can't close window or click icons in window bar without moving window.

    When moving files between disks, the Finder stops responding to the close, minimize and expand window (red, yellow, green buttons). If I grab the title bar and move the window, even one pixel, I can click on the boxes. The same is true of the trash button in the window icons.
    It's just annoying.

    I have been plagued by the same problem ever since upgrading to Mavericks.
    I click the red button on windows (various apps), it goes dark but window won't close until I actually make that window active or move it around somewhere.

  • How to open a window on click of a button?

    Hi,
    I want to open a window(a new browser page) on the click of a button.Can anyone please tell me what i should write in the onAction of the button?
    Regards,
    Padmalatha.K

    hi,
    1.Declare the following in the implementaion of the component controller
    //@@begin others
      IWDWindow modalWindow;
      //@@end
    2.First create a method in the component controller :
    public void createExternalWindow( )
        //@@begin createExternalWindow()
        // create external window
        IWDWindow externalWin = wdComponentAPI.getWindowManager().createNonModalExternalWindow
                                                            ("http://www.google.co.in/", "External");
        //Define window position and dimensions according to acreen parameters
        externalWin.setTitle("Google");
        externalWin.setWindowPosition(WDWindowPos.CENTER);
        externalWin.setWindowSize(1280,850);
        externalWin.show();
        //@@end
    3.Create a button in the view, create an action. assign this action to the button . Now call the method in the view controller.
    public void onActionexternal(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionexternal(ServerEvent)
        wdThis.wdGetPopUpCompController().createExternalWindow();
        //@@end
    Now to create a modal window
    1.Declare the following in the implementaion of the component controller
    //@@begin others
      IWDWindow modalWindow;
      //@@end
    2.Create a new window "NewPopWindow".Declare the following in the implementaion of the component controller.
    public void createModalWindow( )
        //@@begin createModalWindow()
        //creating the window
        IWDWindowInfo winInfo = wdComponentAPI.getComponentInfo().findInWindows("NewPopWindow");
           modalWindow = wdComponentAPI.getWindowManager().createModalWindow(winInfo);
        //display window in centre
        modalWindow.setWindowPosition(WDWindowPos.CENTER);
        modalWindow.setTitle("Modal Window");
        modalWindow.setWindowSize(400,100);
        //opening the window
        modalWindow.show();
        //@@end
    3. destroy the window
    public void destroyModalWindow( )
        //@@begin destroyModalWindow()
        modalWindow.destroyInstance();
        //@@end
    4.Create a button in the view, create an action. assign this action to the button . Now call the method in the view controller.
    public void onActionmodal(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionmodal(ServerEvent)
       wdThis.wdGetPopUpCompController().createModalWindow();
        //@@end
    regards,
    pinki
    Edited by: pinki goswami on Apr 17, 2008 11:42 AM

  • Open new window on click of a button

    Dear All,
    We are using VC for development of Dashboards.
    I have created the related i views.
    First page of dashboard shows all the high level graphs.
    I intoduced a button on the chart to go into details (another Iview)
    I was able to navigate to the next layer on click of button in tool bar and comeback to the first layer again.
    I want to open a new window when I click on the button on the tool bar of chart..
    Is it Possible in VC? Please help us in this regard.
    Points assured in full.
    I have already posted this issue in the forum VC 7.1. But I couldn't get the answer.
    Please Help us.
    Thank You All and Regards
    Joga Srinivasa

    Dear All,
    Sorry for getting back late.
    Thanks for your inputs. Problem is solved using pushbutton. I gave the URL of the second Iview in the hyperlink of the pushbutton system action.
    The problem with the Popup window is that it wont allow you to to go back and choose or analyze other parts of dashboard. so we adopted the pushbutton approach which takes you to another window allowing full access to the main window.
    Once again, Thank you all.
    Points assigned as promised.
    Regards
    Joga

  • How to close main window on click of a button on popup window

    Hi All,
    I have created a web page which on certain condition display a popup window to to provide information. Wht i want is that when i click on close button on my popup window, my main window should also close.
    Can anyone please help with this requierment!!!
    Regards,
    tushar

    Hi All,
    Could anyone of you please help me by answering the thread
    WDDOEXIT method not called when the application is closed from the portal
    Thanks,
    Subash M

  • How can we open a New Window on click of a button

    Dear All,
    Please can anyone guide me how to open a page in A new pop up window.
    Application Express 4.0.1.00.03
    Thanks & regards
    Arif Khadas

    Assalamwalkeum Tauceef,
    Thanks for your reply.
    For the second query where you want to refresh parent window and close the popup window,
    Create a html region and give a condition to this region that it should display on a particular request and pass that request on your button click and write this javascript code in your Region SourceAccordingly I created a Region on the Calling Page and have the condition Request = REFRESH.
    Now my problem is on the pop-up window how can I pass the Request as the action when button pressed is Submit and I am using an SQL Insert Action.
    For such an action for button click the Request field is hidden.
    Also please help me through this one for setting the Item values in the pop up window:
    I have the following in Execute When Page Loads
      var total = 0;
      var inv   = '';
      var selected_inv = '';
      total        = opener.document.getElementById('P24_PAY_AMOUNT');
      selected_inv = opener.document.getElementById('P24_PAY_INV');
      $s('P23_RCP_AMOUNT_PAID', total);
      //setSessionValue ('P23_RCP_AMOUNT_PAID', total);
      $s('P23_INVOICES', selected_inv);
      //setSessionValue ('P23_INVOICES', selected_inv);The value that I am getting for the above Items is "     [object HTMLInputElement]" in Mozilla Firefox and "[object]" in Internet explorer, not sure why?
    Please guide.
    Thanks & Regards
    Arif Khadas
    Edited by: Arif Khadas on Apr 27, 2011 9:51 AM

  • How to open a new window on click of a button, for printing stuffs in adf

    Hi ADF Experts,
    Jdeveloper 11.1.1.7.0 version.
    I am having a Print Button. On click of this I want to open a new window? how is it possible. Note it should not be a popup or panelwindow.
    Please suggest.
    Thanks,
    Roy

    Check out Frank's article http://www.oracle.com/technetwork/developer-tools/adf/learnmore/95-printable-pages-1501392.pdf which come with a sample at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/95-printable-pages-1501393.zip
    Timo

  • How to open new browser window on click of command button

    Hi,
    We have a requirement to open an image in new window when a command button is clicked. Is there any sample explaining how to do that?
    Thanks in Advance,
    Pradeep

    Hi,
    I have to load an applet viewer in the new browser window. I have URL to the PDF.
    I ma able to load the applet viewer in new browser window using javascript. But I have to load the new PDF if the same window in already opened.
    The issue here is , i am loosing the window handle if the parent page is refreshed. I want to store the window handle in session scope variable and use the same.
    How do i update the session scope variable using javascript?
    Thanks and Regards,
    Pradeep

  • Pop Up Window on click of save button

    Hi ,
    I am very new to WebDynpro Java.
    Can somebody plz help me??
    My Requirement-
    On Click of the Save Button ,a Pop Up window should get displayed with a message saying "SUCCESSFULLY SAVED".
    Plz reply soon
    Thanks In advance!!
    Regards
    Smita

    hi!
    1.create a action on the button click
    2.create a value node(popup)--> value attribute
    set the cardinallity as 1..1 and type as com.sap.tc.webdynpro.
    services.session.api.IWDWindow
    3.
    public void okPopup() {
    // @@begin okPopup()
    // get the repository content at runtime of the Web-Dynpro-
    IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI
    .getComponentInfo().findInWindows("okWindow");//give your window name
    // create the u201CokWindowu201D
    IWDWindow window = wdComponentAPI.getWindowManager()
    .createModalWindow(windowInfo);
    // set the WindowPosition on the screen
    window.setWindowPosition(300, 150);
    // and show the window
    window.show();
    // Save WindowInstance in Context
    wdContext.currentPopupElement().setWindowInstance(window);
    // @@end
    4.now you can take text views to show the required message in the popup window.for that you can take the message from message pool and also you can directly write the message in the text property of text view.
    please get back to me if any further clarification is required.
    thanks
    vishal

  • Close form after click on send button

    Hello,
    I would like the adobe form to close after the user clicked on "send by email" button.
    I found this code to do it automatically :
    app.execMenuItem("Save");
    app.execMenuItem("Close");
    But I don't see where I can write it as I can't modify the click event.
    Any idea ?
    Thanks in advance

    I don't know if this will work, but what if you have another button that triggers the submit event and the code to close the form later on? Hide the actual submit button from your layout.
    "Normal Button" code:
    SubmitButton.execEvent("click");
    app.execMenuItem("Save");
    app.execMenuItem("Close");
    Cheers,

  • Close the External Opend window on click of button

    Hi All,
    I have a parent window (A) and there is a button on click of that i am opening a another window as external window(B). Now on window B there is a button CLOSE and on that i want to close that external window. How can i achieve this?? i tried it using exit plug but i m not able to get the currently open windows URL.
    Thanks In Advance.

    Hi Prathamesh,
    I am not clear about your requirement - are you trying to use URL through EXTERNAL WINDOW or you are trying to use WNDOW EXIT?
    If its URL through External Window: following code might help--
    METHOD onactiongo.
    **-Created two radio buttons- SAP and Google. Select a radio button and click on GO button. Will redirect to the required URL
      DATA lo_nd_select_option TYPE REF TO if_wd_context_node.
      DATA lo_el_select_option TYPE REF TO if_wd_context_element.
      DATA ls_select_option TYPE wd_this->element_select_option.
      DATA lv_link TYPE wd_this->element_select_option-link.
    * navigate from <CONTEXT> to <SELECT_OPTION> via lead selection
      lo_nd_select_option = wd_context->get_child_node( name = wd_this->wdctx_select_option ).
    * get element via lead selection
      lo_el_select_option = lo_nd_select_option->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_select_option IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_select_option->get_attribute(
        EXPORTING
          name =  `LINK`
        IMPORTING
          value = lv_link ).
      DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      CASE lv_link.
        WHEN 'SAP'.
          lo_window = lo_window_manager->create_external_window(
                      'http://sdn.sap.com').
          lo_window->open( ).
        WHEN 'GOOGLE'.
          lo_window = lo_window_manager->create_external_window( 'http://www.google.com' ).
          lo_window->open( ).
      ENDCASE.
    ENDMETHOD.
    If its WINDOW EXIT:
    1) Create EXIT button in VIEW.
    2) Go to WINDOWS -> Outbound Plug -> Give Plug Name (e.g: OUT_EXIT) -> Check INTERFACE -> Plug Type = EXIT.
        In same window, in "IMPORTING PARAMETER FROM OUT_EXT" -> Parameter = URL -> Associated Type = String
    3) Go to VIEW -> Properties -> Create Controller Usaged
    4) In "onAction event" of EXIT button, write the following code:
    DATA lo_window1 TYPE REF TO ig_window1 .
      lo_window1 =   wd_this->get_window1_ctr( ).
      lo_window1->fire_out_exit_plg( url = 'http://www.google.co.in' )

  • When a website launches a new window to enter information, Firefox no longer automatically closes the window when you click the submit button. Why?

    For example, when I create a message in my autoresponder service and want to attach an image a new window opens up so I can enter the details of the image (url, position, alt text). When I click the Save button, the information is captured but the window remains open and I have to manually close it.
    Firefox used to close the window automatically.

    YES!! Thank you jscher2000! You sir are a legend. Thanks for this, changed the newtaburl in about:config, totally worked. Nope, never saw it happening! Speedy machine this one :P Yep, that change completely sorted the issue, just opened about 741 new tabs through the shortcut on my mouse just to celebrate. Thanks guys who helped, no thanks those who didn't.

Maybe you are looking for