Can someone help me with this script? The error message I’m getting when the popup is created: oxygenForm is not defined. The script controls two popup windows and adds a window close event.
<script language="JavaScript" type="text/javascript">
<!--
function newWindow(URL) {
windowName = "elementForm";
width = 500;
height = 510;
scrolling = 0;
var topX = (window.screen.width / 2) - ( width / 2);
var topY = (window.screen.height / 2) - ( height / 2);
popupWindow=window.open(URL, windowName, 'width=' + width + ',height=' + height + ',location=no,resizable=yes,scrollbars=' + scrolling + ',screenX=' + topX + ',screenY=' + topY);
// If the browser supports the focus() method place focus on the new window
if (window.focus) { popupWindow.focus() }
// If the Oxygen popup is visible then close it
oxygenForm.close();
}
function oxygenPopup(URL) {
windowName = "oxygenForm";
width = 500;
height = 760;
scrolling = 0;
var topX = (window.screen.width / 2) - ( width / 2);
var topY = (window.screen.height / 2) - ( height / 2);
oxygenWin=window.open(URL, windowName, 'width=' + width + ',height=' + height + ',location=no,resizable=yes,scrollbars=' + scrolling + ',screenX=' + topX + ',screenY=' + topY);
//If the browser supports the focus() method place focus on the new window
if (window.focus) { oxygenPopup.focus() }
}
//-->
</script>