function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arun BalaArun Bala 

window.opener

Hello folks,

I am facing a weird issue. I have a parent window from which I open a popup onclick of a button. And inside the pop up window, I have some links and on click of a link, I need to refresh my parent window with some data.

 

I did some coding like the below on the popup:

 

window.opener.document.getElementById('parent:form1:id1').value= 'test';

 

It works fine on all browsers in one machine but doesnt work in other machines(window.opener comesup as null). Infact we have same versions of browsers on all the machines.

 

Has anyone faced something like this before ? Any inputs would be greatly appreciated folks.

 

 

Thanks

Message Edited by Arun Bala on 02-18-2009 07:25 AM
Best Answer chosen by Admin (Salesforce Developers) 
Arun BalaArun Bala

Folks,

I found the solution. The issue was when the development mode is enabled: at this time, if I refer to window.opener it actually refers to the development editor. So I changed the code to window.top.opener to get the handle of the actual parent window whose objects I wanted to access ...

 

I thought of posting this it might be helpful if someone faces this issue in future .. just in case.

 

 

Cheers.

All Answers

Arun BalaArun Bala

Folks,

I found the solution. The issue was when the development mode is enabled: at this time, if I refer to window.opener it actually refers to the development editor. So I changed the code to window.top.opener to get the handle of the actual parent window whose objects I wanted to access ...

 

I thought of posting this it might be helpful if someone faces this issue in future .. just in case.

 

 

Cheers.

This was selected as the best answer
hisrinuhisrinu

Hi Arun Bala,

 

 

 Can you please post your code here. Because I am having some problem while setting the value from popup window to parent window.

 

The error is showing like window.opener is null

 

Suresh RaghuramSuresh Raghuram

Hi even I am having the same problem could u plz share your code