o.k. it works.
Thank you very much.
Did you know how i can the response (myData) return to the Application.js?
regards,
Georg
qx.Class.define("moto.Loginservice",
{
extend : qx.core.Object,
members :
{
fetchLogins : function(username, password) {
if (this.__store == null) {
// Call the backend service (example) - using XmlHttp
var baseUrl = "http://localhost/moto/build/php/l2s.php";
var url = baseUrl
var req = new qx.io.remote.Request(url, "POST", "application/json");
req.setAsynchronous(false);
req.setUseBasicHttpAuth(false);
req.setData("s_login="+username+"&s_password="+password+"&login=login");
// Add listener
req.addListener("completed", this.Response, this);
req.send();
}
},
Response : function(response){
var myData = JSON.parse(response.getContent());
}
}
});
Application.js:
loginWindow.addListener("changeLoginData", function(ev) {
var loginData = ev.getData();
service.fetchLogins(loginData.username, loginData.password);
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/json-response-convert-into-a-variable-tp5687679p5689367.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel