Hi, I'm afraid that this is not possible using POST. There is responseType property in Request class that says:
responseType Response type of request. The response type is a MIME type, default is text/plain. Other supported MIME types are text/javascript, text/html, application/json, application/xml. Allowed values: "text/plain", "text/javascript", "application/json", "application/xml", "text/html" Init value: "text/plain" So these types of requests are probably not for binary data transfer (I don't know if overriding the property could help). I think that your first way is way to go. How many parameters you need that URL is not enough for you? - Petr 2009/9/29 Alejandro Paz <[email protected]>: > 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 = "¶ms1=png"; > var params2 = "¶ms2=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 > > ------------------------------------------------------------------------------ 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
