Modal dialog - refresh the parent page on close

Hi:
Using Apex 4.02
I have followied Havard Kristiansen's modal dialog example.
I have everyting working, but I have a requreimet to refresh the entire page (parent page) on the close of the modal page.
I have tried quite a few things in dynamic actions on the parent page etc, but nothing is working.
How can I get the parent page to fully refresh when the modal dialog is submitted and closed.
Your help would be most appreciated.
Regards,
Bruce

Hi:
Please - still waiting for help.
Here is what I have tired:
- dynamic action on iframe for page unload to call window.opener.doSubmit() and parent.doSubmit();
- dynamic action on button on ifreame same as above
- branch (plsql) process to call above
None of these worked. The modal dialog closes but the parent page dos not refesh.
I can refresh a report region, but the problem is that the region I want to actually refresh is conditional and is not displayed when you first open the modal dialog. Hence, it does not appear on the return even though the condition is now true.
Any help would be appreciated please!
Regards,
Bruce

Similar Messages

  • 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();

  • Modal panel refreshing the parent

    Hi ,
    I am facing a strange issue.
    I have a parent page and a modal panel opening from the parent. The modal panel displays a data table with pagination.
    When a move to each page(by clicking the page number) of the data table, the parent page getting refreshed and the it gets more darker and darker!!!!(I believe because of the modal nature of the child panel).
    I have included the modal panel as a jsp include
    <jsp:include flush="true" page="/jsf/accountGroupLov.jsp"/>
    Inside accountGroupLov.jsp , i have a dialog panel, where i render the data table.
    <p:dialog  header="#{finmsg.accountGroup_search}" modal="true" width="400px" rendered="#{accountGrpLovHandlerBean.lovVisible}"
         Where I am using primefaces dialog component.
    I dont want the parent page to be refreshed each time I navigate to different pages of the data table in the modal panel.
    Can anybody give a clue?
    Thanks in advance.
    Shaiju

    Hi,
    I have a similar scenario where I want to insert the data to a table and then close the popup window on a 'Apply & Return' button.
    On the button I have set target as URL and URL Target as javascript:passBack2();
    passBack2() is the call to java script I am using from Denes Kubicek application.
    <script language="JavaScript">
       function passBack2()
          doSubmit();window.opener.doSubmit();window.close();
    </script>I have PL/SQL process(After Submit) which triggers on this button to insert the data into the table.
    But when I invoke the popup and enter the data and click on 'Apply & Return', it navigates back to the calling page and refreshes it without executing the PL/SQL process.
    Any thoughts on this please.
    Thanks,
    Raj.

  • Skillbuilders modal dialog - condition for parent page dialog

    Hi
    When using this awesome plugin, I have a dynamic action on my calling page that deals with the selection from the dialog.
    It uses
    Select type:DOM Object
    DOM Object: document
    Condition: javascript expression
    ($v('P110_PROD_SEARCH') == 'BLAH')
    where the js expression is making sure I run the correct dynamic action, particularly when I have a few buttons on the page invoking different variations of the modal dialog.
    My first action is some javascript that interrogates the value of
    this.data.modalPageCloseValue
    this helps me make decisions in later actions on whether to run some pl/sql, for instance
    In light of a recent question of mine regarding a potential APEX bug (Display item with HTML affected by dynamic action and since we can't put conditions on actions - I was wondering if I could incorporate something into my dynamic action condition to stop the entire dynamic action from executing if modalPageCloseValue is null - but it seems to be out of scope?
    Scott

    Scott,
    You're current condition is:
    $v('P110_PROD_SEARCH') == 'BLAH'Just change that to:
    $v('P110_PROD_SEARCH') == 'BLAH' && this.data.modalPageCloseValueRegards,
    Dan
    blog: http://DanielMcghan.us/
    work: http://SkillBuilders.com/APEX/
    twitter: https://twitter.com/dmcghan

  • Skillbuilder Modal Page needs to execute a process on the parent page

    Hi,
    I am using apex 4.1 and theme 2. Also I am using the Skillbuilder modal page plugin.
    I have a modal page with a textbox and a button. On click of this button i want to pass the textbox value to the parent page and execute a process on the parent page.
    I dont want to hardcode the page numbers here as this same popup page will be used in all the pages in the application. It is to capture the comments before submit on each page. Hence it should just pass the values to the page that called this modal window.
    Any help greatly appreciated.
    Thanks in advance,
    DS

    Take a look at these:
    {thread:id=2420256}
    {thread:id=2407235}
    Basically: define a dynamic action on your parent page to act on the close event of the modal page. On your modal page, use the close method of the plugin (and possibly provide a return value)
    From documentation
    Advanced Usage
    Methods
    Close*
    The close method can be used to close the modal dialog programmatically. The method accepts an optional parameter which can be anything. That value can then be >accessed in Dynamic Actions that respond to any of the close events of the plug-in. The syntax to access the value is: this.data.modalPageCloseValue. To access the method >from within the child page, see the third example.
    $(document).apex_modal_page('close');
    $(document).apex_modal_page('close', someVariable);
    parent.$(parent.document).apex_modal_page('close');
    Events
    Manual Close
    The Manual Close event fires when the the modal dialog is closed by either the end user or programmatically by the close method. If the close method was used it’s possible >that an optional value was passed to the close method which is exposed in Dynamic Actions as this.data.modalPageCloseValue.
    Close
    The Close event fires whenever the modal dialog is closed, whether automatically or manually.

  • 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>

  • 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

  • Modifying Desitnation URI to open the PopUp Page on the Parent Page

    Hi,
    We have a requirement where when we click on the link, we have to open a new page on top of the old page(i.e the page on which link is present).
    As of now we are using the below DesinationURI.
    javascript:openWindow(top,'OA.jsp?page=/XXX/YYY/zzzz/ak/TestPG&GrpName={!GroupName}&reportType={@ReportType}&CategoryName={@Newcategory}&retainAM=Y&addBreadCrumb=Y', 'modal', {top:0,left:0,width:window.screen.availWidth,height:window.screen.availHeight,directories:true,location:true,menubar:true,resizable:true,scrollbars:true,status:true,toolbar:true},false, 'dialog', null);void(0);
    Please let me know, how i can modify this destination URI, so that TestPG loads on the parent page itself ie. the page on which the link to open TestPG is present.
    Thanks in advance
    Saurabh

    Hi Anoop,
    I have tried with
    Destination URI = OA.jsp?page=/xxx/yyyy/zzz/../webui/TestPG
    ActionType : FirepartialAction
    Event : Update
    Parameters :
    Name : GrpID
    Value : ${oa.XXXGroupNameVO1.GroupId}
    Now when the page loads, the URL formed on clicking of the link is
    http://10.94.65.116:9016/OA_HTML/OA.jsp?page=/xxx/yyyy/zzz/.../webui/TestPG&_ti=173057009&oapc=2&selection=_3_1_2_
    When i click on the link, page starts loading, loads for few seconds and then the loadin gets completed, but the desired page TestPG is not opened.
    Please let me know, where i am going wrong.
    Thanks in advance
    Saurabh

  • Get the Values of the components inside the region onto the Parent Page

    Hi All,
    I am using Jdeveloper 11.1.1.5.
    I just wanted to know that my use case can be fitted to contextual events or should i use the #{data.pageDef.Attribute.inputValue} to get the values.
    I have a bounded taskflow "ChildTF.xml" with fragment say "child.jsff".Now i have dragged the ChildTF.xml on the other page say "Parent.jspx" as a region.In the child.jsff page i had input form having 20 fields and all the 20 fields are dragged from a View Object so i don't have the field values binded to the Managed Bean and on the parent page "Parent.jspx" i have a button. Now on click of button i need to get the values of those 20 fields of "child.jsff" page.
    How can i achieve this?
    Thanks
    Shah

    Hi Timo,
    Thanks .
    For sharing the data control i should follow this :-
    In the Property Inspector for the called task flow i.e ChildTF.xml, select Behavior.
    In the data-control-scope list, select shared.
    Is there anything else do i need to do ??
    I mean do i need to add the iterator to the parent page also. ?
    Kindly Suggest!!
    Regards,
    Shah

  • Is it possible to refresh the home page or report page automatically?

    Hi.
    I'm develping EM plugin with EM 11 extensibility.
    Is it possible to auto refresh the home page or report page?
    It contains the view data(real time 30 sec page..) select list combo at the matric detail page.
    and it is displayed on the right of the top at the database main page
    Thanks,
    wonjo.
    Edited by: wonjo on Oct 5, 2010 10:49 PM

    Also, there are enhancements in progress to the extensibility framework which will, in future versions of EM, allow this type of control over chart/table refresh for plugins.

  • How do I make accordian tabs open different images on the parent page

    I am totally new to spry and hope there is an easy way to achieve what I want to do.
    Basically, I want to use an horizontal accordian spry menu so that when the user clicks on a menu item the text appears in the box but an image opens in a seperate fixed box on the parent page. When selecting another menu item the image changes accordingly (but still in the same fixed box)
    I appreciate any help
    thanks

    > When I insert the three form list/menus Dreamweaver does
    not allow me to turn
    > the lists into links. Javascript allows you to turn them
    into links. All I
    > want to know is what script to write.
    That is because you inserted a plain select form item.
    Insert a JUMPMENU and dw will do the coding for you.
    Open the F1 help, click search and type jumpmenu
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • How do I make an embedded Javascript element(embedded MS Excel chart) automatically refresh so that viewers do not have to refresh the entire page to get updated information.

    I am creating a web page that features an embedded chart made by MS Excel. I would like the chart to automatically update(refresh) to show viewers live information without having to refresh the entire page. I have found that there is a way to enable this through Excel but with my current subscription cannot access that feature. I am hoping that there is a way to achieve this using Adobe Muse CC. If it is not possible, I would like to know if there is a way to add a "refresh" button that refreshes only the embedded section(Excel Chart) of the page for viewers to use manually. Thank you for your help.

    Update! The embedded spreadsheet is actually embedded using HTML rather than javascript.

  • ReturnToPortal() doesn't refresh the portal page

    In the community preference page, when finishing changing the preference, calling IPortletResponse.ReturnToPortal() closed the preference page but didn't refresh the portal page. What needs to be done to refresh the portal page so the portlet can be refreshed with the new pref data?
    ALUI 6.1MP1.
    TIA!

    This is why it doesn't work...
    There is a bug that I filed for this, basically that icon on the portlet header works for user and admin preferences... it make sense to add community preferences there too to make it all consistent.
    The problem is: community preferences behaved differently.. in 5.x, the only way to edit them was to go through edit this community... the refresh mechanism is built into the community editor.
    In g6 that didn't change... you still need to go through that route to actually update the portal with the new preferences. going through the icon does nothing. user and admin prefs will work b/c they also worked like that in 5.x.
    Basically, it's a bug b/c community prefs never worked like that... adding it to the button promoted the sense that it should work, which it never did...
    so you have to go through the edit this community route to make it refresh.

  • Dashboard prompt Refreshes the whole page

    Hello Experts
    When i change a dashboar prompt on the dashboard, it refreshes the whole page instead of that one report where the dashboard prompt applies. How can i limit to just refresh or update only the reports it is suppose to instead of all the reports on the dashboard page. Please advise.
    Thanks
    Ravi

    I agree to what you are saying, in my case if i have 3 reports on the dashboard page only report is is prompted the other two reports are not, still those reports gets refreshed which means i get processing rotating clock on all the 3 reports even though the 2 reports dont change with the prompt selection and then all the report appears. It is just annoying for the users, so i just want that one report to update or refrsh and the other reports should stay still. Hope i am little clear this time.
    Thanks
    R

  • Modal dialog missing the close button

    My AI extension (CS6) is set to be a ModalDialog (from the Bundle Manifest Editor UI Window Type).  It displays as a dialog correctly, but there is no close button in the title bar.  Is this something that needs to be done in code or am I missing something else?
    I don't mind adding my own close button in the dialog if I need to, but it seems the title bar close button should be there.

    Modal Dialogs have no close button.
    You need to add it yourself.
    Harbs

Maybe you are looking for