• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 301
  • Last Modified:

Refresh Main Window

I open a popup window:

var windowHandle = '';
function popOpen(url,name,attributes) {
         windowHandle = window.open(url,name,attributes);
}

The popup window contains a form that submits to iself, does some processing and then reloads itself.

I want to refresh the main page after the processing is done in the popup window.

When i try to use window.opener I get error "Class doesn't support automation..."

0
yourbudweiser
Asked:
yourbudweiser
  • 4
  • 3
1 Solution
 
Pravin AsarCommented:
after refresh

window.opener.refresh();
0
 
Pravin AsarCommented:
I mean

After processing your page in the child window.. do

window.opener.refresh();

0
 
Pravin AsarCommented:
or you could do

window.opener.location.reload(true);
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
yourbudweiserAuthor Commented:
thanks for the response

When i try to use window.opener I get error "Class doesn't support automation..."
0
 
Pravin AsarCommented:
try

self.opener instead of window.opener


0
 
sam2912Commented:
You can use window.opener in the child page, only if you had opened the child page using the window.open() method in the parent page. If you have opened another page using a hyperlink with the target="_blank", both can't communicate with each other.

Am I right?
0
 
yourbudweiserAuthor Commented:
sorry for the delay in responding but none of these suggestions work...

based on my original question, can I modify the popup script so that the original page is refreshed?
0
 
yourbudweiserAuthor Commented:
ha! i found the answer to the problem !

using the code above, I would get a JS error "Class doesn't support automation."

I fixed this issue by clicking on "Start Menu" - "Run", and entering the following entries on command prompt:

regsvr32 msscript.ocx   [enter]
regsvr32 dispex.dll   [enter]
regsvr32 vbscript.dll   [enter]

and now the window.opener works !
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now