Cross domain issues

I have an application that requires the user to authenticate before a menu is built for them according to their privileges.

The routine that builds the json for the GroupList is a RESTful service hosted on another server and so when it is invoked via the dhx.ajax call there are cross domain issues and the list is not populated.

To get around this we have used “jsonp” and have resorted to using jquery to invoke the service before populating the control:


		type : "GET",
		dataType : "jsonp",
		async : false,
		crossDomain: true,
		url : "http://<url>/n.jsonp",
		success : function (text) { $$('mainMenu').parse(text,"json"); }


Does anyone know if there an equivalent way of doing this with dhx.ajax?

You can use

dhx.jsonp(url, params, callback)

The order of parameters is exactly the same as in case of dhx.ajax, but it will use jsonp and will be able to load data in cross-domain way.

dhx.jsonp("http://<url>/n.jsonp", function (text) { $$('mainMenu').parse(text,"json"); });

Thank you.