Hi,
i've a search form which open in popup window and from there i can populate form field in main window. I know if i've to directly populate form field in parent window then i can easily do with "opener" but the problem is when i do search and navigate in child window and after that when i am trying to populate form elements in main window then it gives me JS error.

Please advice me how can i resolve this problem.

Code:
function SndrID(RID, RName) {
    opener.document.MsgBox.RecvrID.value = RID;
    opener.document.MsgBox.RName.value = RName;
    opener.window.focus()
    self.close()
}
Thanks in advance