From e68255167e23b19536c98f06fcabf93d52c46e8d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 17 Nov 2010 12:31:13 +0000 Subject: [PATCH] IE fails, if windows name in egw_openWindowCentered2 contains something no a letter, number or underscore --> removing it --- phpgwapi/js/jsapi/jsapi.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpgwapi/js/jsapi/jsapi.js b/phpgwapi/js/jsapi/jsapi.js index 2b679f464a..686e47905c 100644 --- a/phpgwapi/js/jsapi/jsapi.js +++ b/phpgwapi/js/jsapi/jsapi.js @@ -178,6 +178,8 @@ 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-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 + ",location=no,menubar=no,directories=no,toolbar=no,scrollbars=yes,resizable=yes,status="+_status);