From af75f60ff4a5a9f05e3414ab78b4b2c089fa8cab Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 24 Apr 2011 12:40:06 +0000 Subject: [PATCH] fixed IE(8) javascript error: "null" is null or not an object --- phpgwapi/js/jsapi/jsapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 9fa9bf3361..0a7e892879 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -273,7 +273,7 @@ function egw_openWindowCentered2(_url, _windowName, _width, _height, _status, _a positionLeft = (windowWidth/2)-(_width/2)+egw_getWindowLeft(); positionTop = (windowHeight/2)-(_height/2)+egw_getWindowTop(); - if (is_ie) _windowName = _windowName.replace(/[^a-zA-Z0-9_]+/,''); // IE fails, if name contains eg. a dash (-) + if (is_ie) _windowName = !_windowName ? '_blank' : _windowName.replace(/[^a-zA-Z0-9_]+/,''); // IE fails, if name contains eg. a dash (-) windowID = window.open(_url, _windowName, "width=" + _width + ",height=" + _height + ",screenX=" + positionLeft + ",left=" + positionLeft + ",screenY=" + positionTop + ",top=" + positionTop +