Hello everyone, i know this question may have been asked many times before but i really can’t find a solution to it!
I’m opening a new window and trying to set the visibility style for one of the child window’s buttons but it seems nothing of which i tried is working, here’s the latest code i’m trying but it won’t work
[CODE]
var newWin=window.open(“window_1.html”, “_blank”, “”);
newWin.onLoad = function() {
newWin.document.getElementById(“return”).style.visibility=”hidden”;
}
what I’ve managed to get it work is to check for opener value in the child window if it doesn’t equal to null and it worked
[CODE]
//child window
function chkOpen() {
if (window.opener != null) {
document.getElementById(“return”).style.visibility=”hidden”
}
}
But i really need to know if i can access a child window’s DOM from the opener code?