Question

3
Replies
499
Views
Khnb38 Member since 2016 14 posts
Huntington Bank
Posted: 2 years ago
Last activity: 2 years 3 months ago
Closed

In Non-IE browser, window.opener.document.getElementById is returing null

Hello,

On the OOTB button, we have a JS that uses window.open to point to an external URL. After using window.open, we are trying to refresh the parent window for which we are retrieving the element of the parent window using window.opener.document.getElementById(id'). However, in FF/Chrome, this is returning "null". Using 6.3 SP1

<script>

window.open('<%=PDFURL%>','_self','' );

var reloadElement = window.opener.document.getElementById("RefreshAfterPrint");

alert(reloadElement); ------- This is returning null in FF/Chrome only. IE returns the object.
window.opener.pega.u.d.reloadSection(reloadElement, "", "", false, true, "-1", false);

</script>

***Turned off future commenting per Original Poster's Request***

Low-Code App Development User Interface
Moderation Team has archived post
Share this page LinkedIn