From 4d29125c4149c9a2e4acbb5aba3c7e5586a2b730 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 28 Oct 2013 22:22:09 +0000 Subject: [PATCH] Fix some window/scope issues with jquery & plain assign handlers to make sure they operate on the window, not the request context (which can be anything) --- phpgwapi/js/jsapi/egw_json.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/js/jsapi/egw_json.js b/phpgwapi/js/jsapi/egw_json.js index fca49a7c4c..b3b3f60d7a 100644 --- a/phpgwapi/js/jsapi/egw_json.js +++ b/phpgwapi/js/jsapi/egw_json.js @@ -262,7 +262,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) { (typeof res.data.key != 'undefined') && (typeof res.data.value != 'undefined')) { - var obj = document.getElementById(res.data.id); + var obj = _wnd.document.getElementById(res.data.id); if (obj) { obj[res.data.key] = res.data.value; @@ -359,7 +359,7 @@ egw.extend('json', egw.MODULE_WND_LOCAL, function(_app, _wnd) { return true; } throw 'Invalid parameters'; - }, null, 'jquery'); + }, _wnd, 'jquery'); // Register the "redirect" plugin json.registerJSONPlugin(function(type, res, req) {