dhx.ajax().post problems

Hello,

Here is my problem, maybe you’ll have a solution.

the code:

function login(){
	try
	{
		var loginURL = "wcf service";
		var params = {username: "demo", password: "demo"};
		dhx.ajax().post(loginURL, params, loginCallback);
		//dhtmlxAjax.post(loginURL, "demo", afterCall)
	}
	catch(err)
	{
		var txt = "" + err.message + "\n\n";
		alert(txt);
	}
}
function loginCallback(loader)
{
        alert("Response from service");
        $$("loggedIn").show();
}

After cross-site problem solved (added custom headers in service) I met another.
Now everything works fine on pc, every browser. Trying this in android (don’t have another OS), the callback function does not raise.

Tried a couple of android mobiles (samsung, dell, htc) with various browsers, but everywhere is the same problem.

I have tried change dhx.ajax().post(loginURL, params, loginCallback); to var xhr = dhx.ajax().sync().post(loginURL, params); . Then you don’t need a callback function, and again on pc everything works fine, but on andriod phone I get network_err xmlhttprequest exception 101

Thanks,
Donatas

Now everything works fine on pc, every browser. Trying this in android (don’t have another OS), the callback function does not raise.

It is very possible that version of webkit in mobile browser is much more older, and it may not recognize the headers which you have added at server side ( as this standard is pretty young )

Which headers were added on server side to allow cross-site access ?

Access-Control-Allow-Origin: *

I coundn’t solve the problem all the weekend.

Didn’t anybody met the same problem?

putting a breakpoint on server mothod, it doesn’t break from android mobile while on pc breaks the breakpoint.