Close popup window and refresh the parent window

Hello,
I have a button in a normal report, when clicked opens up an popup window which is a form containing some items and here in this form (i have some editable text items) I make some changes and click on the apply changes button -- this should update the form, close the popup window and should refresh the parent window.
can anyone please help me out with this issue.
Thanks,
Orton

you have your popup window. When they apply the changes you want it to close the window, right?
Modify the button (save, apply changes) and give it url redirect to the custom function you create (See below): javascript:saveChanges();
in the page header, add a new function:
<script type="text/javascript">
function saveChanges(){
     doSubmit('SAVE');//this is the line to save the current form on the popup window. (This assumes SAVE is the request value that should udpate the db)
     window.close();//close the popup window
     window.opener.doSubmit('REFRESH');//call doSubmit function on the parent window to cause the page to refresh.
</script>

Similar Messages

  • Open URL in a new window by closing the parent window

    Hi Friends,
    Is there any option to open URL in a new window by closing the parent window on a button click?
    Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the thread ' URL in same window '  and the standard component WDR_TEST_EXIT_PLUG .But button is not triggerring any actions .plz help me  ..............
    Regards,
    Radhika

    hi,
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit .   <zexit is name of my Component>
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    I hope it helps.
    Thanx.

  • How to create a Child Window without closing the parent Window

    Hi All,
    I have a requirement to create a child window without closing the parent window. I have to click an item in the parent window, then one child window should get open. The parent window should not be closed before closing the child window.
    Kindly help me in this.
    Thanks and Regards,
    Myvizhi

    Hi All,
    I found the solution for this. I have created a new page. Then i created an item as link item style in the parent page and i have set the following properties in the Link item:
    Destination URI : OA.jsp?page=/seagate/oracle/apps/seasoa/que/webui/SeaSoaHeaderDetailPG&headerId={@ErrHeaderId}&retainAM=Y&addBreadCrumb=Y&backPage=S
    Target Frame     : _blank
    This is opening the new child window without closing the parent window.
    Thanks and Regards,
    Myvizhi

  • When I open a new window, the current window is closed. I would like to keep the current window and open the new window without losing my current window. I checked "Open new window in a new tab instead" under tabs

    When I open a new window, the current window is closed. I would like to keep the current window and open the new window without losing my current window. I checked "Open new window in a new tab instead" under tabs
    == This happened ==
    Every time Firefox opened
    == Noticed yesterday, June27, 2010

    i just went into preferences, deleted what was in the home page, and entered a new home page address which solved the problem, 

  • Passing Value from a Popup Window Back to the Parent Window

    I am using JSF. I try to pass a value that is entered by users in the popup window back to a text field in the parent window.
    quote: document.forms[ ].elements[ ] is null or not an object.
    The relevant code snippets are shown below. The screen1.jsp is the parent window:
             <script language="JavaScript1.1">
               function doPopup(source)
                    popup = window.open("externalFilePopup.jsp",
                        "popup",
                         "height=300,width=200,toolbar=no,menubar=no,"                    + "scrollbars=yes");
                    popup.openerFormId = source.form.id;
                    popup.focus();
               </script>
    <h:outputText value="Enter the external system file name"/>        <h:inputText value="#{dataManagementBean.ip}" size="18" />
    <h:commandButton value="..." onclick="doPopup(this); return false;" />
    ..........The externalFilePopup.jsp is the popup window:
            <script language="JavaScript1.1">
                function doSave( value )
                   var formId = window.openerFormId;
                   opener.document.forms[ formId ].elements[ formId + ":ip" ].value = value;
                   window.close();
            </script>
         <h:outputText value="IP Address: "/>
         <h:inputText size="25" value="#{dataManagementBean.ip }" required="true"/>
         <h:commandButton value="OK" onclick="doSave('#{dataManagementBean.ip}');"/>
            .......... The script error occurs when I click on this OK button.
    Please point out the mistakes in my code. Thank you.

    I have made some modifications to the code in the popup window. The error reported in my previous posting is gone. But, I still have several problems:
    1. syntax error in the popup window jsp page: line 45, char 21, syntax error, ..., Do you want to continue running script on this page?2. The popup window does not close after I click on the OK button that I coded in the popup window jsp.
    3. The value that I entered in the popup window eventually gets passed back to the text field in the parent window only if I re-run the application.
    The relevant JavaScript code snippets are:
            <script language="JavaScript1.1">
                function doSave( value )
                   var formId = window.openerFormId;
                   opener.document.forms[ formId ].form[ formId + ":ip" ].value = value;
                   window.close();
            </script>
                                       <h:outputText value="IP Address: "/>
         <h:inputText size="25" id="ip" value="#{dataManagementBean.ip }" required="true"/>
         <h:commandButton value="OK" onclick="doSave('ip'); return=false;"/>
    ......What are the mistakes that I made?

  • How to post the data to a new window and control the new window's property?

    When we submit the form data to another page, we usually do the following:
    <form action="display.jsp" method="post"> will submit the form data and open
    display.jsp in the current browser
    <form action="display.jsp" method="post" target="_blank"> will submit the form data
    and open display.jsp in a new browser
    Now, what I want is to open display.jsp in a new browser, but control the window's size,
    and disable the status bar, title bar, and address bar of a new browser.
    If I do this, it can only open a html page, but not post the data to display.jsp.
    window.open('display.jsp', "newWin", "scrollbars=0,menubar=0,toolbar=0,location=0,status=0");
    any ideas? thanks!!

    <html>
    <head>
    </head>
    <script language="JavaScript">
        function doSubmit() {
           displayWindow = window.open('', "newWin", "scrollbars=0,menubar=0,toolbar=0,location=0,status=0");
           document.submitForm.submit();
    </script>
    <body>
    <form name="submitForm" action="display.jsp" method="post" target="newWin">
      <input type="text" name="param1"><br>
      <INPUT TYPE="button" NAME="button" Value="Click" onClick="doSubmit()">
    </form>
    </body>
    </html>

  • Create pop-up page, submit it and refresh the "parent" one.

    Hi, I have a page where I have region with the report where I display pictures associated with the record. What I would like to have is enable user to click a button which would open pop-up page to submit new picture and after submission region would be refreshed showing new picture with description.
    Is this possible?
    Thanks
    Robert

    I still don't know if this is possible.
    To create thubnails create report with the link to the pictures using code below
    decode(nvl(dbms_lob.getlength(photo.thumb),0),0,null,'<img src="'||apex_util.get_blob_file_src('P35_PHOTO',photo.record_id)||'" width="48" />') "RPA_THUMB"
    photo.thumb is where you store thumb in the back end
    P35_PHOTO item used to upload photo
    photo.record_id is the photo id
    Robert

  • How to re-show a dialog with the parent window

    I am writing an Menu drivern application:
    -- A JCMDIPane is put in the JFrame.
    -- Multiple JCMDIFrames are added to the JCMDIPane via menu selecting events
    -- Each JCMDIFrame (call it parent) may pop up a Dialog window (child) (Thes dialogs are modal)
    Here is my problem:
    When you switch away from this Java application to other applications (reading mauls, editing word documents, surfing web), of course, the Java program is hiding behind these applications and only left a Icon on your taskbar. The problem is that when switch back from other application to this Java program, However, it only shows the parent window (the JCMDIFrame ) and the child (the dialog) is behind. You have to using Alt_Tab to get the focus on the child and show it.
    My question is:
    Is there any way can we show the Dialog window is on the parent window (as it originally shown)?
    I have tried to overwriting the paint method of JCMDIFrame :
    public void paint(Graphics g)
    super.paint(g);
    if(child != null && child.isShowing())
    child.setVisible(true);
    This works on other applications but not on the Internet Explore (It always show the dialog).
    Anybody can give me a clue?
    Thanks!

    When you pop up a dialog, if you use the constructor:
    Dialog(Frame owner, boolean modal);
    and pass it an instance of the parent frame (and set "modal" to "true"), then it is my understanding that it should always appear in front of the parent - are you sure this is what you are doing?
    Double check by doing myDialog.getOwner() and make sure it's not null.

  • How to make the parent window inactive when a child window is opened

    hi everybody, i am chaitanya. i am working on a window based application. there are some action events in it. when an event occurs then a child frame is opened prompting the user to confirm for yes or no.
    the problem i got is, when the child window is opened the parent window is also active. I dont want this to happen. please help me to fix this problem.
    thank you all in advance, have a nice day.

    Use a modal JDialog, or better still given the apps. requirement for input, a JOptionPane. The JOptionPane.showInputDialog() or JOptionPane.showConfirmDialog() methods seem well suited to the task.

  • Modal popup window refresh the parent (calling) window/view

    I have a modal popup window that is adding detail records.  When this window is closed via the Hide method in my controller I would like to refresh the parent (calling) window/view.
    What is the best way to do this?
    Regards,
    Diane

    Here's my process.....
    2-windows & 3 views
    Window 1 - Selection View and Detail View
    Window 2 - Add View (used as a modal popup window called by a button click on the detail view)
    Selection View has all the options for obtaining a list of data for the detail view.  The detail view has an Add button.  Component controller has the hide method and access to the other components that do the update/query methods. On the detail view the user can click Add and a popup modal window shows.  User enters data and clicks either the add or cancel button.  The Detail view needs to refresh to show the additional data that has been added by the modal window.  There are calcuated values in the detail view from a supply function.  This function is not running and the values are not changed.
    What should be put in the hide method that will cause the detail view to obtain new data and supply the calculated values?  If I was using the Add view as part of the same window as the detail/selection views I'd just put in a navigation link between the detail and add views and fire the plug.  I like the idea of the popup window so I'd like to get this to work.
    I put the wdContext.initialize() in the hide method - which yes - caused the detail view to run - however the context lost all the key values so I received a data not found.  I then tried to initialize those nodes that did not contain the key values but the detail view did not display new values.
    Thanks for any ideas.....Diane
    Edited by: Diane Fuller on Jan 8, 2009 6:48 AM

  • Problem refreshing the parent page when closing a modal window.

    I have page that opens a modal window from a report link column. In the modal window I want to be able to make my changes and press an Apply button so that the modal window is closed and the parent page is refreshed to show the modified details in the report. In Firefox all works well but in IE I get the error message ‘Window.opener.location is null or not an object’ .
    When I comment out window.opener.location.href=window.opener.location.href; the modal window closes without error but I want to refresh the parent page with changes made in the modal window.
    I’m afraid my java script is very limited (the code is based on other peoples examples.)
    Parent Page I call this function from a report link column to display a modal window. Sets the hidden SAVE_STATUS field in destination page to ‘N’
    function modalWin(pshow)
    var url;
    url='f?p=&APP_ID.:'+pshow+':&SESSION.::::SAVE_STATUS:N';
    if (window.showModalDialog) {
    window.showModalDialog(url,"name","dialogWidth:650px;dialogHeight:700px"); }
    else {
    window.open(url,"name","height=700,width=650,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
    Destination page (modal window)
    HTML Header.
    The function closeWindow should refresh the parent page and close the modal window.
    <base target=_self>
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    function closeWindow() {
    if ( document.getElementById("SAVE_STATUS").value == 'Y' )
    window.opener.location.href=window.opener.location.href;
    window.close();
    //-->
    </script>
    Html Body attribute.
    onLoad="closeWindow();"
    P_UPDATE_DATE process called from the Apply changes button. Sets the SAVE_STATUS flag to ‘Y’ for the onload in the html body.
    UPDATE event
    SET event_date = :P5001_EVENT_DATE
    WHERE contract_reference = :P330_EVD_CONTRACT
    AND event_number = :P330_EVD_EVENT_NUMBER;
    :SAVE_STATUS := 'Y';
    Thanks in advance, I will have a look when back in the office on Monday.
    Cheers Pete

    Hi Chris,
    Thanks for your help. I think I've sorted it using your first suggestion doing a refresh in the parent page, I just didn't know how at the time.
    What I've got in the parent window after the call to the modal window is the reload window.location.reload(); and in the modal window I close it using window.close(); The down side being the refresh happens if I use my 'Apply changes' or 'Cancel' button but I can live with that for now.
    It seems to work in IE and firefox but as I say most of what I'm doing is cobbling together using other peoples code without really understanding exactly what it does. Anyway thanks for your help, sound like I should look into JQUERY when I have time.
    Thanks Pete
    Parent window call to modal
    function modalWin(pshow)
    var url;
    url='f?p=&APP_ID.:'+pshow+':&SESSION.::::SAVE_STATUS:N';
    if (window.showModalDialog) {  window.showModalDialog(url,"name","dialogWidth:650px;dialogHeight:700px");                                          }
    else {
    window.open(url,"name","height=700,width=650,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
    window.location.reload();
    Modal Window Close.
    window.close();

  • Design Studio Scripting function "refresh" to reload the BI LaunchPad Browser Window and solve the automatic adjustment

    Hi experts,
    I have created a Design Studio application with GridLayout Components to ensure the automatic adjustment.
    In the local mode everything works fine! If I maximize or minimize the browser window the automatic adjustment of the design studio application works absolutely correct.
    If I execute the same Design Studio Application in SAP BI LaunchPad the automatic window adjustment works only fine if I refresh the Browser window after minimize or maximize.
    Example:
    Mnimized and refreshed Browser window (good):
    Maximzed and not refreshed Browser window (bad):
    To fix this issue, Is there a workaround with a scripting funtion (e.g. ".refresh") to give the user the possibility to reload the browser window by a button or icon?
    By the way, the issue and the Todo "Refresh" is valid in Design- and Runtime!
    Many thanks in advance!
    Best regards,
    Michael

    Hi Michael,
    Isn't this issue fixed in 1.2 SP1?
    In any case if you want to manual refresh you have to redraw the chart, this can be achieved by,
    reloading data source,
    change some selection in the chart,
    or change the data source, (apply filter,swap dimensions etc.)
    Regards,
    Fazith Ali Z.

  • HT5140 I did put another language in input source, and keyboard shortcut, but when I close this window, after opening the mail window, where do I see different language to click on?

    I did put another language in input source, and keyboard shortcut, but when I close this window, after opening the mail window, where do I see different language to click on?

    You switch keyboards by going to the " flag" menu at the top right of the screen.

  • How to submit the parent window from child window

    Hi,
    I am looking out for a solution. I have a main JSP page and on clicking a button in the page a pop up window will be displayed, which is too a JSP page. Finally i should submit both Popup window JSP page and the parent window JSP page, when clicking the button in pop up window. Can anyone come out with some possible solutions.

    Hi
    Please go through this.. check thomas reply
    Re: Close Main Window directly on action on Pop up window
    also check this..
    how to close main window on click of a button on popup window
    cheers,
    Kris.
    Edited by: kissnas on May 12, 2011 5:06 PM

  • How to pass the data from a pop up window to the parent window

    Hi All,
    I have a jsp page which contains a add button, while clicking it a popup will come out(which is a another jsp page). There are some input fieldsand a submit button. Now how could I send the data from the pop up to the parent winow. Also I have to check that if the pop up is open and I click add button then another pop up must not open.
    Plz reply its urgent
    Thanks and Regards
    Rajib Sharma

    Thanks for the reply
    But it not worked
    I have a jsp page and the popup is also a jsp page the data that is passed from the popup window to the parent must be send to the server from the parent window to get a data from the data base as search result. Its of no use to get it as js data
    Thanks and regards
    Rajib Sharma

Maybe you are looking for