yourbudweiser
asked on
Refresh Main Window
I open a popup window:
var windowHandle = '';
function popOpen(url,name,attribute s) {
windowHandle = window.open(url,name,attri butes);
}
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..."
var windowHandle = '';
function popOpen(url,name,attribute
windowHandle = window.open(url,name,attri
}
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..."
I mean
After processing your page in the child window.. do
window.opener.refresh();
After processing your page in the child window.. do
window.opener.refresh();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the response
When i try to use window.opener I get error "Class doesn't support automation..."
When i try to use window.opener I get error "Class doesn't support automation..."
try
self.opener instead of window.opener
self.opener instead of window.opener
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?
Am I right?
ASKER
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?
based on my original question, can I modify the popup script so that the original page is refreshed?
ASKER
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 !
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 !
window.opener.refresh();