Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesRefresh Parent Page from popupRefresh Parent Page from popup
Previous
 
Next
New Post
7/2/2010 3:36 PM
 
Hi,

I am trying to figure out how to refresh a parent page after a popup is closed. I am using the following code to redirect a separate module to a popup, from a command button on a GridView.


Dim rowIndex As Integer = CType(e.CommandArgument, Integer)
Dim billingDetailIDValue As Integer = CType(GridView1.DataKeys(rowIndex).Value, Integer)

Dim objTabs As New TabController
Dim objTab As Entities.Tabs.TabInfo = objTabs.GetTabByName("Claim Billing", PortalSettings.PortalId, PortalSettings.AdminTabId)
CustomFunctions.Redirect(NavigateURL(objTab.TabID, "", "pid=" & PortalId.ToString & "&BillingID=" & billingDetailIDValue), "_blank", "menubar=0, width=800, height=800, scrollbars=1")

I am currently using JavaScript to close the popup after an action is performed, but I also want to refresh the initial page, so it shows the changes that were performed in the popup. I did some digging and found that the following should refresh the parent page:

Page.ClientScript.RegisterStartupScript(Page.GetType, "CLOSE", " ")

But it is not working, it just refreshes the popup. Any Ideas how I can get this working?

Thanks,

Chris
 
New Post
7/2/2010 4:46 PM
 
you can do this via opener.location.refresh()

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/6/2010 8:59 AM
 
Hi Cathal,

The code I had pasted did have more code in it, it just got removed probably because I am entering code incorrectly to the text editor here,

It should have the following added into it

window.opener.reload(true);self.close();<../.script..>

I put in your reccomendation

If I do opener.location.refresh();self.close(); then the popup will refresh itself and not close.

If I do self.close();opener.location.refresh(); then the popup will close but the parent page will not refresh.

Any ideas why this might be?
 
New Post
7/8/2010 10:37 AM
 
I got this to work using the following:

Dim scriptString As String = "<...script.. language=..JavaScript...> window.opener.document.forms(0).submit(); "

If Not Page.ClientScript.IsClientScriptBlockRegistered(scriptString) Then

Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "script", scriptString)

End If

Still not sure how to put code blocks in.

Chris

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesRefresh Parent Page from popupRefresh Parent Page from popup


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out