Close popup data input window once CREATE button pressed?

Hello,
I have a data input form opened as a popup, it contains 2 buttons (CANCEL & CREATE). The cancel button just uses the javascript:window.close(); command and works fine. The CREATE button creates the record correctly but when it tries to close (using a branch with the same javascript command as the create button), it fails and I get the following:
The window doesn't close.
It gives me the error: Cannot find server. The page cannot be displayed.
Does anyone know how I can close the popup form after a new record has been successfully created.
Many thanks
Sue

Hi
I think it does not work because you cannot close and submit a page at the same time. One idea is to create an empty page, and add this code to the Page HTML body attribute:
onload=window.close();
Then make the popup page branch to this page after submit...
I hope this helps.
Luis

Similar Messages

  • Force to close popup

    Hello,
    Im using Jdeveloper 11g .
    I have popup.On the popup you can choose what kind of file do you want to open and to press OK button for opening file. And everything works fine. But I want to close popup when you choose file nad after pressing button OK.
    On other popup this is work corectly but here not, because button is calling fileDownload.
    This is way how i usualy clos popup:
    FacesContext context = FacesContext.getCurrentInstance();
    String popupID= popID.getClientId(context);
    StringBuilder script = new StringBuilder();
    script.append("var popup3 = AdfPage.PAGE.findComponent('").append(popupID).append("'); ").append("if (popup3.isPopupVisible()) { popup3.hide();}");
    ExtendedRenderKitService erks = Service.getService(context.getRenderKit(), ExtendedRenderKitService.class);
    erks.addScript(context, script.toString());
    This is button:
    <af:commandButton text="OK" id="cb1"
    actionListener="#{backingBeanScope.Izvodi.closePopup}">
    <af:setActionListener from="#{pageFlowScope.idIzvoda}" to="#{pageFlowScope.Print.jasperParam}"/>
    <af:setActionListener from="eizvod" to="#{pageFlowScope.Print.jasperTip}"/>
    <af:setActionListener from="#{backingBeanScope.Izvodi.vrstaStampeSufiks}" to="#{pageFlowScope.Print.jasperVrsta}"/>
    <af:fileDownloadActionListener contentType="application/x-download" method="#{pageFlowScope.Print.printReport}" filename="#{backingBeanScope.Izvodi.pdfXls}"/>
    <af:resetActionListener/>
    </af:commandButton>
    Do you have idea how to force to close popup after pressing button OK????
    Thanks!!!!

    I really dont know how it doesnt work for me.
    Please, take a look.
    <af:popup id="popStampaj" eventContext="launcher" launcherVar="source" contentDelivery="lazyUncached" binding="#{backingBeanScope.Izvodi.popStampaj}">
    Bean:
    import oracle.adf.view.rich.component.rich.RichPopup;
    private RichPopup popStampaj;
    public void closePopup(ActionEvent actionEvent) {
    popStampaj.hide(); // method hide not found
    public void setPopStampaj(RichPopup popStampaj) {
    this.popStampaj = popStampaj;
    public RichPopup getPopStampaj() {
    return popStampaj;
    It is all. I really dont know what is problem. How do you have method hide() and I dont have???
    Do you use the same version JDeveloper like me?
    Thanks :)
    Edited by: djavolchic on 09.06.2010. 03.53

  • Regarding create button

    Hi,
    i am developing one scree,in that screen create button is not working.
    Situation:
    top of the page SelectOneChoice(these values are fixed values).below this one creation form(only one input text box and Create button).this is from view object.below this one ADF Table(editabale).this is from same view object.this table is dynamically populated with selectOneChoice.i am using binding concept here.
    Problem:
    when i select list value then corresponding table result is coming.in between these two i have one input texbox and create button.if i enter value in to input textbox and press create button extra row sholud add in the table and that should visible.but in my screen value enter the input textbox and create methot is executed but not showing any row in this table.
    sample screen simulation:
    selectOneChoice:--------------------------------
    inputText(name)----------------------Create Button
    Table
    name is the one column in table.if i enter name value and press create button then sholud display inserted row in top of the table(before commit).

    Hi,
    i assigned "SelectOneChoice" component id value 'table_id' to table PartialTrigger value 'table_id'.because table is come form choicelist value(VO sql_statement is binding with SelectOneChoice value).
    now i am trying to assing same id(table_id) to create butten id then it showing Alert error Box like this "Could not set id to table_id,Unmatched braces in the pattern".
    what i have to do now?
    Thanks,

  • Increment once per key press

    I'm trying to find the 'proper' method to do this basic concept of incrementing a value (in this example) once per key press:
    Is there a more efficient (using less cpu and/or less code) way to do this?
    I am also curious why you can't add shift registers to the case structure.
    Solved!
    Go to Solution.
    Attachments:
    Feedback node run once per button press.vi ‏9 KB

    martinv wrote:
    (Note I posted this before seeing the 2 replys that snuck in before this post)
    I think I get it.  Is this what you described (Pic Below)?
    I first thought the loop would be running continuously, but after putting on an indicator I see it does nothing until the case inside is finished. 
    Glad to see you figured it out.  Slight edits I recommend:
    1) Make a case in your event structure for the Stop:Value Change and put the stop terminal inside of that case.  You will then wire the value of the stop button (or a true constant) from that event case to the loop conditional terminal.  This will allow you to stop your loop immediately instead of being forced to wait for another event (or possibly 2) before actually stopping.
    2) I would use a shift register for the value.  This way other cases can affect/read the value without the use of a local variable.  Be sure to wire the value through all of the other cases.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to close the adobe forms in popup windows once.

    hi,expert..
    i show a adobe form in a popup windows in my webdynpro program...but i find out that i at least click twice on the "CLOSE" button on the right top of the window.....how can i modify my program to  close the window once..
    the original codes are as follow:
    method onactionprint .
       data lo_nd_zhrhap_vp_app_01 type ref to if_wd_context_node.
      data lo_nd_zhrhap_t_document type ref to if_wd_context_node.
      data lt_zhrhap_t_document type wd_this->elements_zhrhap_t_document.
      lo_nd_zhrhap_vp_app_01 = wd_context->get_child_node( name =
    wd_this->wdctx_zhrhap_vp_app_01 ).
      lo_nd_zhrhap_t_document = lo_nd_zhrhap_vp_app_01->get_child_node(
    name = wd_this->wdctx_zhrhap_t_document ).
      lo_nd_zhrhap_t_document->get_static_attributes_table(
        importing
          table = lt_zhrhap_t_document ).
    DATA lo_nd_zhrhap_s_app_leader TYPE REF TO if_wd_context_node.
    DATA lo_el_zhrhap_s_app_leader TYPE REF TO if_wd_context_element.
       data ls_zhrhap_s_app_leader type
    wd_this->element_zhrhap_s_app_leader.
    lo_nd_zhrhap_s_app_leader = lo_nd_zhrhap_vp_app_01->get_child_node(
    *name = wd_this->wdctx_zhrhap_s_app_leader ).
    lo_el_zhrhap_s_app_leader = lo_nd_zhrhap_s_app_leader->get_element(
    lo_el_zhrhap_s_app_leader->get_static_attributes(
       IMPORTING
         static_attributes = ls_zhrhap_s_app_leader ).
    DATA lo_nd_zhrhap_s_dates TYPE REF TO if_wd_context_node.
    DATA lo_el_zhrhap_s_dates TYPE REF TO if_wd_context_element.
       data ls_zhrhap_s_dates type wd_this->element_zhrhap_s_dates.
    lo_nd_zhrhap_s_dates = lo_nd_zhrhap_vp_app_01->get_child_node( name
    *= wd_this->wdctx_zhrhap_s_dates ).
    lo_el_zhrhap_s_dates = lo_nd_zhrhap_s_dates->get_element(  ).
    lo_el_zhrhap_s_dates->get_static_attributes(
       IMPORTING
         static_attributes = ls_zhrhap_s_dates ).
    采集表名称和日期
      data lo_nd_if_data type ref to if_wd_context_node.
      data lo_el_if_data type ref to if_wd_context_element.
      data ls_if_data type wd_this->element_if_data.
      lo_nd_if_data = wd_context->get_child_node( name =
    wd_this->wdctx_if_data ).
      lo_el_if_data = lo_nd_if_data->get_element(  ).
      lo_el_if_data->get_static_attributes(
        importing
          static_attributes = ls_if_data ).
      ls_zhrhap_s_dates-valid_begda = ls_if_data-begda.
      ls_zhrhap_s_dates-valid_endda = ls_if_data-endda.
    DATA lo_el_zhrhap_vp_app_01 TYPE REF TO if_wd_context_element.
       data ls_zhrhap_vp_app_01 type wd_this->element_zhrhap_vp_app_01.
       data lv_description like ls_zhrhap_vp_app_01-description.
    lo_el_zhrhap_vp_app_01 = lo_nd_zhrhap_vp_app_01->get_element(  ).
    lo_el_zhrhap_vp_app_01->get_attribute(
       EXPORTING
         name =  `DESCRIPTION`
       IMPORTING
         value = lv_description ).
    REPLACE ALL OCCURRENCES OF '类别:' in lv_description with ''.
      lv_description = ls_if_data-stext.
      data l_is_ok    type boole_d.
      data pdf_source type xstring.
      data l_msg      type ref to cl_hrpa_message_list.
      create object l_msg.
      call method zcl_hr_appraisal_utility=>print_contract_direct
        exporting
        form_type           = 'COD'
          zhrhap_t_document   = lt_zhrhap_t_document
          zhrhap_s_dates      = ls_zhrhap_s_dates
          zhrhap_s_app_leader = ls_zhrhap_s_app_leader
          description         = lv_description
        job_description     =
          message_handler     = l_msg
         importing
          is_ok               = l_is_ok
          pdf_xstring         = pdf_source
      check l_is_ok is not initial and pdf_source is not initial.
      data lo_nd_pdf type ref to if_wd_context_node.
      data lo_el_pdf type ref to if_wd_context_element.
      data ls_pdf type wd_this->element_pdf.
      data lv_source like ls_pdf-source.
      lo_nd_pdf = wd_context->get_child_node( name = wd_this->wdctx_pdf ).
      lo_el_pdf = lo_nd_pdf->get_element(  ).
      lo_el_pdf->set_attribute(
        exporting
          name =  `SOURCE`
          value = pdf_source ).
    *-->ADOBE View embeded to ViewContainer UI
      data: lr_view               type ref to if_wd_view_controller,
            lr_api_main           type ref to if_wd_component,
            lr_window_man         type ref to if_wd_window_manager,
            comp_usage            type ref to if_wd_component_usage,
            l_title               type string value '打印合同',
            lr_window             type ref to if_wd_window.
      lr_view = wd_this->wd_get_api( ).
      lr_api_main = wd_comp_controller->wd_get_api( ).
      lr_window_man = lr_api_main->get_window_manager( ).
    l_title = wd_colr_mp_controller->model->get_text( '006' ).
      call method lr_window_man->create_window
        exporting
          modal        = abap_true
          window_name  = 'POPUP'
          title        = l_title
          button_kind  = if_wd_window=>co_buttons_yesno
         message_type = if_wd_window=>co_msg_type_none
          default_button = if_wd_window=>co_button_yes
        receiving
          window       = lr_window.
      lr_window->open( ).
    endmethod.
    looking forward to your help....thanks in advance

    Ping,
    1st, see the Markup formatting options over on the right part of the screen - if you wrap your code between the code tags it will read MUCH better.
    2nd, I can't replicate this issue - we have several PDFs opening in new windows & we only need to click once on the clost 'X' - how are you calling the PDF in a new window?
    If you can't find a final resolution, an alternative would be to place a LinktoAction on your web dynpro application somewhere that makes sense which would close the window for you.
    We do this on Sucess Message Views...
    You can simply add the link to action to the screen, and in the event handler use
       data : l_view_cntr type ref to if_wd_view_controller,
           l_win_cntr  type ref to if_wd_window_controller,
           l_window    type ref to if_wd_window,
           l_parameter_list  type wdr_event_parameter_list,
           l_parameter       type   wdr_event_parameter,
           l_val type ref to data.
    field-symbols <fs> type any.
    l_view_cntr = wd_this->wd_get_api( ).
    l_win_cntr  = l_view_cntr->get_embedding_window_ctlr( ).
    l_parameter-name = 'CLOSE_WINDOW'.
    create data l_val type c.
    assign l_val->* to <fs>.
    <fs> = 'X'.
    l_parameter-value = l_val.
    insert l_parameter into table l_parameter_list.
    l_win_cntr->if_wd_view_controller~fire_plug(
    exporting plug_name = 'EXIT_PLUG'
               parameters = l_parameter_list ).
    Make sure you have an Exit plug on your Window with Plug Type EXIT.

  • Help Needed. Creating popup windows when creating an app. And a text search button

    Hi, I'm new to indesign and am having trouble creating popup windows when creating an app. Also i would like to create a text search button so that people can search text within my app. Can these things be done?? im using cs6 at the moment.

    Questions on creating apps with the Adobe Digital Publishing Suite need to be asked in the DPS Forum, where I've moved your question.

  • 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

  • Close popup window

    Hi experts,
    There is a popup window, with two button:
    SAVE
    CANCEL.
    i create the popup in this way:
    lr_popup = lr_window_manager->create_window(
        modal               = abap_true
        window_name         = 'WND_POPUP'
        title               = lv_text
        close_button        = abap_true
        button_kind         = if_wd_window=>co_buttons_yesno
        message_type        = if_wd_window=>CO_MSG_TYPE_NONE
        close_in_any_case   = abap_true
    lr_view_controller = wd_this->wd_get_api( ).
       lr_popup->subscribe_to_button_event(
                       button            = if_wd_window=>co_button_yes
                       button_text       =  'Save'
                       action_name       = 'SAVE'
                       action_view       = lr_view_controller
                       is_default_button = abap_true ).
       lr_popup->subscribe_to_button_event(
                       button            = if_wd_window=>co_button_no
                       button_text       = 'Cancel'
                       action_name       = 'CANCEL'
                       action_view       = lr_view_controller
                       is_default_button = abap_true ).
       lr_popup->open( ).
    My problem is that, if the user press the SAVE button,  then I have to make some checks, and if they don't pass, an error message should be created, and the popup shouldn't close.
    My question is: How can I do that?
    It's ok that if I use the paramter:
    close_in_any_case   = abap_false
    then the popup isn't closed, but how can I close it in the action handler method of the Close button (or the save when the cehcks are fine)
    Thnaks.
    N.

    Hi,
    When there are errors do you want to display them on popup. If there are errors and user closes the window(click on close) button then these errors are shown in parent view rather on popup window.
    Do you want to handle this also..
    In addition to making that close_button as abap_false. there is a method to handle on button close in if_wd_window interface.
    Try to use and write the close window code.
    If you donot want to show the errors in parent view, In the abobe metthod for window close, clear all the messages and then close the window.
    check out this link -
    Re: Form field validation messages in pop-up window
    Regards,
    Lekha.

  • Don't close popup window on action

    Hello!
    I have a popup window, which contains another window from my component. I assigned actions to buttons. I need not to close popup after action in some cases. I want to decide in action's method. How can I avoid closing the popup?
    Edited by: Konstantin Milutin on Feb 24, 2010 12:55 PM

    Hi,
    when u are creating the pop up window then there is a parameter close_in_any_case set its value as abap_false.

  • Creating a pop up text window from a button within an Applet

    I want to create an applet with two clickable buttons in it (this I know how to do). When a visitor to the site clicks on one of the buttons, I want a separate window to pop up and display a few lines of text. A different text message will be displayed depending upon which button was clicked.
    I can't figure out how to create a pop up window when the button is clicked. In fact I'm not even sure that this is possible as the user must have the facility to close the window after they have read the text, and from my limited knowledge of Java and applets this would involve system exit() ??? and this is not allowed.
    I am new to Java and would appreciate any help that anyone can offer.
    Thanks
    Jim

    Write the popup frame as if you were writing an application, but don't set the close operation. From the applet just setVisible(true) and again, don't worry about the close issue.
    Visit my website, any of the samples except button, to see windows popping from applets.

  • Create Popup or external window

    Hi,
    I have some code in wdDoInit() of View. Before view completely loads, I require to popup a dialog box or external window with a message.
    Is this possible to create Popup or external window from the first view of the application, such that the popup appears first and then the rest of the view loads?
    Presenty I do not get any popup even though I have done coding for the same and straight away the view appears.
    Thanks
    Anagha
    Message was edited by:
            Anagha Jawalekar

    Hi Anagha,
    First go to the Method tab of view and create two Event handlers (“Ok” and “Cancel”).
    Then try this code inside wdDoInit() of view.
         String dialog = "Do You Want to Continue? ";
         IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok"),"OK");
         IWDEventHandlerInfo CancelEventInfo = wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Cancel");
         confDialog.addChoice(CancelEventInfo,"Cancel");
         confDialog.show();     
    Check this links.
    <a href="http://help.sap.com/saphelp_nw70/helpdata/en/0f/134540631d6f13e10000000a1550b0/frameset.htm">Creating an External Window</a>
    Generic Search
    Re: opening a new window on lead select in a table!!!
    Re: close a pop-up window
    Regards,
    Mithu

  • How to create a dialog window with no button that opens along with the main window?

    When the main window is open, the dialog window opens up immediately and can be closed by key press. At other times, when the next step, ie: decision, comes to, the another dialog window pops up again and is again closed by key press. Does anyone know how to do? Use the sub-Vi? notification method? occurrence method?
    And another thing: how to create a reusable dialog window with no button so that different messages can be sent to it and it can closed by key press. And how to pass the string to the title of the dialog window programmatically?

    For your functionality (If I understand it right), nothing needs to be in the event structure. Pressing any key just triggers the event, thus finishing the VI (there is no while loop).
    Could you tell me what you mean my "it won't run properly"? Make sure that the front panel of the subVI is closed before starting the main VI. Remember that the subVI is set to "open when called" and "close afterwards if originally closed". So, if you had the panel open already, it won't of course close when finished!
    (Actually, the problems is worse when you have the subVI panel open when starting the main VI. you get a catch22 and labVIEW locks up because (1) the subVI is set to dialog and grabs all attention but (2) it has not been
    called, thus the event cannot be triggered. So don't do that!!!! As a quick workaround, add the modification shown in the attached image to ensure the panel of the subVI is closed.)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    CloseNoButtonDialog.gif ‏3 KB

  • Programming a close acrobat and browser window button into PDFs

    Hi Everyone,
    We are wondering if you could help us.
    We are creating a Flash site which launches many PDFs, these PDFs launch in Acrobat, either in Acrobat itself or through the browser window plugin.
    We want to be-able to program a close button into the PDF that does the following:
    1. Closes the PDF file
    2. Closes Acrobat
    3. Closes the internet browser window
    Does anyone know how we might do this?
    Thanks,
    Steve
    ps. we have had suggestions that we should of integrated the PDFs into Flash, tthis would have been fantastic, but unfortunately we are now to close to the deadline to integrate this.

    I don't think you can do any of those things from a button embedded in
    a PDF in a browser.
    Aandi Inston

  • Need popup w/o buttons to display info then close popup...

    Hello Experts,
    I need a popup to show info like "Saving of PO form is in progress..." without any buttons.
    Just a window to show some text then when a certain condition is true, then I will close the popup.
    Below is a rough idea of what I want to achieve:
    - call popup to display message
    - LOOP statement
         if condition is true, then close popup
    The popup should not contain any buttons because we do not want to let
    the user close the transaction.
    Thank you guys and take care!

    Hi
    I infer from your discription is that you just want to display a pop-up containing a message to the end user.
    For this you can make use of MESSAGE of type I. It does display the mesage in a pop up window.
    You can also try out the Function Module: POPUP_FOR_INFORMATION.
    Hope this solves your problem.
    Regards
    Gaurav.

  • My MacBook has Leopard Printer has asked me to 'embed fonts' in pdf text. I have used Web but mostly out of date or Windows focused. Can you advise me how best to embed fonts on pdf documents created with TextEdit ?  Thank you.

    My MacBook has Leopard. A printer has asked me to 'embed fonts' in pdf text. I have looked csrefully on Web but mostly out of date or Windows related.
    Can you advise me how best to embed fonts on pdf documents created with TextEdit ?  Thank you.  PippinD

    Hi
    Level 2 posters and Above can report various posts.
    When they do so they have various options that they can attribute as the issue.
    I have reported your post.
    I found the one block of text very difficult to read.
    9:36 PM      Monday; January 28, 2013
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

Maybe you are looking for

  • Add Alt Attribute Info to a Custom Button

    I have created an alternative to editing the "whtbar.js" file to give an image alt attribute information. We have a custom button in our help file that needed alt information, but we had already incorporated the text into the button's image and did n

  • Hi Can anyone guide me configure LDAP client in solaris 8 server.

    Hi, I am already having the solaris 8 LDAP master server. We have new server which i need to confgure as a client to that master server. Can any one help me to configure the same. Thanks in Advance.... Bala......

  • Missing $10 certificate for Xbox One Sunset Overdrive Console bundle

    Hello, I am missing my $10 certificate for pre-ordering the Xbox One Sunset Overdrive bundle. I pre-ordered the console on-line on 9/1, and I picked up the console in-store on realease day on 10/28. It's been well over 20 days for the certificate to

  • Errors in stand by alert.

    though my 4 node stand by database is sync with 4 node primary.. my alert log on the stand by database filling with this erros.. RFS[1]: Archived Log: '/archive/kftscp_1/2_1490_690902567.dbf' Primary database is in MAXIMUM PERFORMANCE mode RFS[1]: No

  • Migrating forms 6i to 10g

    Hi all I am trying to migrate my 6i version forms to forms 10g using form migration tool provided by developer suite.. one of my form has sub class item. When i am trying to migrate it giving some error.... ERROR opening D:\forms\emp.fmb :oracle.form