http request, mootools, POST/GET sending variables problem on titanium
Hello, I have a web application working flawlessly but i there are some issues on the porting to win32 using Titanium. The web app is based on PHP, Mootools and JSON. When I use Titanium I have problems sending variables through mootools' Requests: PHP actually responds to the request but no variables are passed and in the end most of the php code is useless… why does this happens? also, I tried with Titanium.Network.createHTTPClient()
instead of mootools' Request. This is the log:
scheme is not supported by HTTPClient
here is my code
var params=/*some params*/
var THEurl=/*<xxx>.php*/
var xhr = Titanium.Network.createHTTPClient();
xhr.onload=function(){
xhr.open('POST',THEurl);
}
xhr.setRequestHeader('Content-Type', 'text/html; charset=utf-8');
xhr.send(params);
2 Answers
-
first problem is that
xhr.open('POST',THEurl);
should not be inside the onload function
look at kitchen sink example
-
hello i'm occured the same problemes i can't access my database with (http://localhost:8888/post_register.php")
post_register.php is locat in the www folder of the wamp server.
can help me right now please???