Popup refreshing parent page
Hi everyone,
I've got a popup window that allows the user to edit some values. These values are displayed on the parent page. Most of the time, when the save button on the popup is clicked, the popup closes and the parent refreshes and displays the new value.
sometimes however, the new value is not displayed. Manually refreshing the parent causes the correct value to display. This suggests that the database action behind the page is not finished in time for the updated values to appear on the page.
Is there any way I can ensure the database action is completed before the page refreshes? I've put an arbitrary delay timer on the popup but it seems crude. I'd like to wait as long, but only as long as necessary before reloading the page.
Any help appreciated!
Kieran
Turns out, it's still happening.
Any ideas welcome after all :)
Message was edited by:
Kieran
Similar Messages
-
Refresh "parent" page when closing a cfwindow
When displaying a cfwindow and I click the x in the top right, how can I refresh the "parent" page?
The cfwindow has a small form that collects data in a couple of fields then submits in the cfwindow to a page that inserts the request, sends and email and says the action is complete.
This is my cfwindow:
<cfajaximport tags="cfform,cfwindow">
<cfwindow
name="NewRequestWindow"
center="true"
closable="true"
draggable="false"
height="550"
width="700"
modal="true"
initShow="false"
refreshOnShow = "true"
resizable="false"
title="#WindowText#"
source="NewRequest.cfm?pk=#pk#" />
<a href="#" onclick="javascript:ColdFusion.Window.show('NewRequestWindow')"><img src="../includes/images/add.png" alt="Add" title="<cfoutput>#WindowText#</cfoutput>" width="16" height="16" border="0" /></a>
Thanks, CliffThis JavaScript will reload the current page:
document.location.reload()
From within your cfwindow it should work for the entire page.
copied from other post http://forums.adobe.com/message/3227674 -
Refreshing parent page from an IFRAME - javascript?
Hi
I have an IFRAME embedded in a jsp page. In the IFRAME, a user gets to submit a form, after which I need it to call the parent jsp page to refresh itself. The JSP page has a table with values from the database and needs to be refreshed to reflect the new form submitted to the database.
I believe i'll need to use javascript for this, since I'm not using struts, or action classes.
can anybody help out, with code samples? I've tried searching on google, but most examples are incomplete. If anyone has a link to it I'll be very grateful.
Thankswell to refer to the parent frame, from the javascript panel I believe you can just access window.parent.
so window.parent.location.reload() should do it.
However reloading the parent window, will also reset the iframe. If you are going to reload the parent frame anyway, you could potentially submit to it instead of your iframe form by using a target="_parent" on the iframe's form.
Hope this helps,
evnafets -
IE 11 Parent Page/Tab refreshes automatically when we close Child page before completion of load
HI,
We have opened the application in IE 11 then when i am click on the button it will open another window, before it is opening fully we have closed the child page then it is refreshing parent page automatically because of this what ever the changes we
are having in the parent page got lost.
Please help me regarding the same. Thanks.Hi ,
Would you please share us with more details?We will check whether it is caused by the website or the IE.
What kind of this application is ? Is it an add-on or a feature built-in the specific website?
Does this is problem occur on a specific website or all of the websites?Would you please share one problematic website with us if possible and give us a guide so I can test in my own machine?
Is it the first time to work with this application if it is an add-on?
If you are the developer of the IE application or website, then I suggest you post this issue in the
Internet Explorer Dev Center to look for help. Here is the link:
Internet Explorer Dev Center
https://social.msdn.microsoft.com/Forums/ie/en-US/home?category=iedevelopment
Best regards -
Popup form refreshing parent window
We have a main parent page, from which you can do many things
(among them add a file, delete a file, replace a file, where
replace is basically delete then add) - the way it's coded, when
you first go to the page, the parameters are in the URL; if you add
a file, they stay in the URL, and everything's happy; if you
replace or delete a file, though, the URL gets stripped of the
parameters (since they're now in form variables). If you *then* go
to add or replace a file after replacing or deleting, when the
popup that lets you choose the file to add closes and tries to
refresh the parent, you get the annoying "to display this webpage
again, Internet Explorer needs to resend form data..." popup. If
the user clicks "retry", it works just fine, but I'd like to
eliminate the annoyance if at all possible.
Right now, the refresh parent/close popup is being
accomplished with javascript:
opener.location.reload(true);
self.close();
The root of the problem seems to be that the delete function
doesn't need a popup, and so doesn't retain the full URL with
parameters, and I could do a lot of work to change that, but I'm
wondering if there's any other way around this that might be
simpler, since it's not something that comes up often or even
causes any functional problems, but is annoying.Bummer.
I actually already tried that, but I think because we're
using fuseactions, it took me back to the default page for that
URL, which is not the same page. Ah, well. -
To close popup page from parent page .
HI ,
I want to close the popup page when my parent page is redirected to login page when session gets invalidated.
with out calling any onload or any kind of functions in popup jsp page.
In my application when i open a popup page from the main page ,when the session is getting expired parent page is redirected to login ,but still the popup page is in active state.i want it to be closed when the redirect happen for the parent page.
Please help me in this matter.
Thanks in advance.This is a Javascript question, not a JSP question.
I'll give only a hint then: get hold of the handle of the popup window so that you can call close() on it.
If you stucks, please continue at a JS forum. There are ones at webdeveloper.com and dynamicdrive.com. Once again: JSP is completely irrelevant in this question. Just base the problem on the HTML and JS output generated by JSP. -
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 PeteHi 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(); -
Every time I refresh a page, a popup:
"To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier."
...appears.
Is there any way I can disable this popup?
Thanks for the help :)Thanks for the help everyone but I have tried safe mode, disabling addons, etc, it does not fix the problem..
Is there any way to disable this popup in the about:config? -
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,
BruceHi:
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 -
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
SaurabhHi 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 -
Refresh First page after returning from a framed pop-up window
HI Can anyone help me on this technical problem.
I have got one mainpage and from there i'm calling a popup with two frames (left, right). At frame right i'm populating the tableview.
So when i submit(button) in tableview(right), the table contents has to be replicated in the first page and the popup has to be closed. So far it has be done successfully.
The problem is when i return to the first page the page is not getting <b> refreshed automatically</b>. FYI, i'm not using mvc for performance reasons.
So i need your help on how to refresh the first page, after control passes from popup.
Here is the code, that calls the popup window
winvar=window.open("organization.htm", 'main','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');Hi Craig & Raja,
Let me tell thanks for your response. But your valuable solutions are not working for me. Please, check this code and please let me know that any thing went wrong.
Here is the code
My main page is progress.htm
============================
<script language = "javascript">
function openOrgTree(){
var winvar;
winvar=window.open("organization.htm", '<b>Main</b>','height=450,width=650,status=yes,scrollbars=yes,toolbar=no,resizable=yes');
</script>
<htmlb:inputField id = "InputOrgPlan"
showHelp = "X"
onValueHelp = "javascript:openOrgTree()" />
<% if application->i_desc is not initial.%>
<htmlb:tableView id = "tvX"
headerVisible = "false"
design = "alternating"
visibleRowCount = "3"
fillUpEmptyRows = "true"
columnWrapping = "false"
onHeaderClick = "MyEventHeaderClick"
onRowSelection = "MyEventRowSelection"
keyColumn = "Text"
table = "<%= application->i_desc %>"
iterator = "<%= iterate %>" />
<% endif. %>
</td></tr>
organization.htm (is the frames container)
=========================================
<!-- frames -->
<frameset rows="110%,*">
<frameset cols="40%,*" >
<frame name="left" src="tree.htm" marginwidth="0" marginheight="0" scrolling="No" frameborder="0">
<frame name="right" src="table.htm" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
table.htm (right frame)
==========================
function callSubmit()
alert(parent.window.name);
// displays the name as "<b>Main</b>" which i gave at the time opening oraganization.htm
// parent.window.opener.refresh();
// window.opener.location.href = window.opener.location.href ;
window.opener.refresh();
parent.close(); // to close the popup
// all of the above are not working
</script>
<htmlb:page onLoad = "callSubmit()">
<htmlb:button id = "submitbutton"
onClick = "myButtonClick"
onClientClick = "callSubmit()"
width = "10"
text = "Submit" />
i need onClick to populate the internal table and onClientClick to refresh the opener.
if event->id = 'submitbutton'.
refresh application->i_desc.
application->i_desc = i_desc.
Regards
Swaroop -
Application not working after refreshing a page with F5
Hi,
Developed an application with jazn-data for security reason. In my application, i've taskflow with page fragments. In this fragment, i;ve LOv field with client listener to popup LOV using 'F8' key. After refreshing this page using 'F5' key or browser's refresh button, my application gets hanged. Even sign out button also not accessible. In browser's console i got "LaunchPopupUsingF8 is not defined" error. LaunchPopupUsingF8 is my javascript function for LOV popup.
Kindly guide me whats wrong in this...
Edited by: Usha on Sep 26, 2011 5:10 AMHi,
I would use JavaScript to disable the F5 button as it leaves the application in an undefined state after refreshing the content from the browser cache
see page 36 onwards (search for F5) for an idea
in http://www.oracle.com/technetwork/developer-tools/jdev/1-2011-javascript-302460.pdf
Frank -
Problem with popup in a page fragment
JDev 11.1.2.1
I'm using the code described here to launch popup from a backing bean.
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/oct2010-otn-harvest-183714.pdf
How-to launch a popup programmatically from Java
Starting Oracle JDeveloper 11.1.1.3, instance of af:popup can be opened using a Java method on the RichPopup object. The RichPopup class is the bean implementation of the af:popup ADF Faces tag. To launch a popup from a managed bean, you first need to get a hold on to a rich popup instance, which you can do by searching it on the UIViewRoot or by referencing a JSF component binding – which you create using the "binding" property of the af:popup component tag. To open the popup you then call
RichPopup.PopupHints ph = new RichPopup.PopupHints(); popup.show(ph);
It works fine except when the popup is inside a page fragment.
In IE 7 I get the javascript error message
"this.getDomNode().parentNode' is null or not an object"
I have also tried the following code; that works fine except when the popup is inside a page fragment.
FacesContext context = FacesContext.getCurrentInstance();
String popupId = popup.getClientId(context);
FacesContext facesContext = FacesContext.getCurrentInstance();
ExtendedRenderKitService service =
Service.getRenderKitService(facesContext,
ExtendedRenderKitService.class);
service.addScript(facesContext,
"AdfPage.PAGE.findComponent('" + popupId + "').show();");
Any idea how to launch a popup in a page fragment?Since this is working for others I'm working on a test case to send to oracle.
I'll try to give more information.
Main.jspx
has a region for Child.jsff using a bounded task flow.
<af:region value="#{bindings.Child.regionModel}" id="r1"/>
Child.jsff has a popup bound to backing bean and a button that calls java to open the popup.
Child.jsff has its own set of bindings. It is not inherting parent bindings.
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:f="http://java.sun.com/jsf/core">
<af:resource type="javascript"/>
<af:group id="g100">
<af:popup childCreation="deferred" autoCancel="disabled" id="p1" binding="#{TestBacking.testPop}">
</af:popup>
<af:commandButton text="testPopup" id="cb1" actionListener="#{TestBacking.test}"/>
TestBacking.java
public void setTestPop(RichPopup testPop) {
this.testPop = testPop;
public RichPopup getTestPop() {
return testPop;
public void test(ActionEvent actionEvent) {
RichPopup.PopupHints ph = new RichPopup.PopupHints();
testPop.show(ph);
Edited by: Phil on Nov 14, 2011 11:53 AM
Edited by: Phil on Nov 14, 2011 11:58 AM -
Displaying Refresh, Edit Page, Customize Page buttons from Banner Template
I have built a customized banner template which displays button images for refresh, edit page, and customize page. The functions all work well, but these functions should not be invisible to the user when they do not have the proper privileges
For Example, when page caching is enabled, I need to see the Refresh Link (icon), or when the user cannot edit the page, then the icon for page editing should not be displayed.
What are the API calls that I can make from a banner template to decide if the page is cached or not?
How do I tell whether the user had edit page privilege? Customize Page?
nullAll these solutions offered above are correct related to the refresh of the page, but it seems to be other problem, it seems that when the Save button is pressed, the commit is done(after I press Save I checked the database and the row is updated), but the transaction is not ended, it seems to get stuck, this is the reason why a refresh is not done on the page, only when Cancel is pressed, the transaction finishes and the page refreshes.
Is this possible for the inline popup, not to end the transaction even if on the task flow I have a task flow return for Save, where at the End Transaction property I have Commit?
I have changed the task flow by setting Behaviour to <No Controler Transaction>, for the task flow returns I changed End Transaction from Commit/Rollback to none and added on the jspx page of the inline popup the Save and Cancel buttons, with actionListener="#{bindings.Commit/Rollback.execute}" but the problem remains the same.
I suppose that it's a problem with the way I use the VO instance in the popup. Do you have any idea in what situations this can happen or did you encounter similar situations?
Thanks,
Georgiana -
Passing checkbox values to popup window on page submit
Hello,
I'm using APEX 3.2.
On one page I have a SQL report with checkboxes that are dynamically created using SQL: select apex_item.checkbox(1, bm_id) as "check", ...
I now want to add a button to the page and when a user clicks on the button, the page should submit and a popup window should open with some extra fields to fill in. Now, in the popup window, I want to add a PL/SQL process and loop to all the values of the checked checkboxes in the parent page using the APEX_APPLICATION.G_F01() array. Can I do this? I tried it but the array always seems to be empty. Do I have to pass all checked values to the Javascript function which opens the popup window??
Thanks,
MatthiasMatthias:
The APEX_APPLICATION.G_F01() will have values only after the form has been submitted.
So,your best bet is to use javascript to make the selected checkbox values available in the pop-up window.
Varad
Maybe you are looking for
-
IMac 2008 24'' NVIDIA 8800 GS/NVIDIA GT 130
Hi guys, I also got a 2008 24" 3.06 iMac with 8800GS After all adventures with my card (baked 3 times) and each baking was good for 3-6 months. Finally (I hoped so) I bought a new chip and made it swap in a specialized laboratory (as I've been told t
-
Really frustrated!!! Using SP 2010 with VS 2010. Created a simple project with just 1 elements.xml file for adding 2 columns. Scope of the feature is "Site". When I right click and deploy it gives below error. Error occurred in deployment step 'Activ
-
Combining 2 computer iPhot0 4 + 6 - pics are not viewing
Hi I am trying to combine 2 macs. The old one has iPhoto 4 and the new one iPhoto 6. When I link the 2 together with a firewire - I see the iPhoto library get copied over. But iPhoto 6 cannot see the files. The new machine has 4 separate drives. One
-
Experienced Web Services development Employee Opportunity in North Jersey
A dynamic young firm that has developed a state-of-art solution in enterprise communication applications is expanding its organization. With a growing business they are now seeking an experienced Web services developer with the following skills. • Wo
-
SAP_DEMO BI content missing with new install
I cannot find/install any SAP_DEMO BI content with a new install. An older OSS note suggested to create source system "SAP_DEMO" and it should work. no luck. Any thoughts?