I want to know how can i load a image to my qooxdoo Widget.
The image is remotely generated with a certain parameters send to PHP (PHP
generated the image).
I have a way to generate the image and its work, but i want to do it a
better way.

*The working way is:
Example:
var params1 = "&params1=png";
var params2 = "&params2=120";
var img = new qx.ui.basic.Imagen("http://localhost/genImg.php?style=graph"; +
params1 + params2");

like i said this example works, but i need to send more complex data in json
format.

*The new way but with error:
I used the object qx.io.remote.Request
Example:
var params = new Object();
params.type = "png";
params.width = 120;
var ajax = new qx.io.remote.Request("genImg.php", "POST");
ajax.setRequestHeader("Content-Type", "application/json");
ajax.addListener("completed", function (e)
{
       alert(e.getContent());
}, this);
ajax.setData(qx.util.Json.stringify(params));
ajax.setAsynchronous(false);
ajax.send();

This return the image binary code, but i don't know how i can show it.
Thanks for your help like always.
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to