mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Add a check to handle being called from inside a frame
This commit is contained in:
parent
0ae16ca1ed
commit
b5179882ab
@ -20,7 +20,15 @@ function egw_json_request(_menuaction, _parameters)
|
|||||||
//Copy the supplied parameters
|
//Copy the supplied parameters
|
||||||
this.menuaction = _menuaction;
|
this.menuaction = _menuaction;
|
||||||
this.parameters = _parameters;
|
this.parameters = _parameters;
|
||||||
this.url = window.egw_webserverUrl + '/json.php';
|
var url = window.egw_webserverUrl;
|
||||||
|
|
||||||
|
// Search up to parent if the current window is in a frame
|
||||||
|
if(typeof url == "undefined")
|
||||||
|
{
|
||||||
|
url = top.egw_webserverUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.url = url + '/json.php';
|
||||||
this.sender = null;
|
this.sender = null;
|
||||||
this.callback = null;
|
this.callback = null;
|
||||||
this.alertHandler = this.alertFunc;
|
this.alertHandler = this.alertFunc;
|
||||||
|
Loading…
Reference in New Issue
Block a user