On Tue, Jul 5, 2011 at 11:01, Mustafa Sak <[email protected]> wrote:

> ** **
>
> Hi list,****
>
> ** **
>
> what do you think? Would it be useful to have a function at qx to send post
> request?
>

qx.io.remote.Request can be used to issue a POST request. That's how RPC
works. Just specify "POST" as the second parameter to the Request
constructor, and add your data to the request with request.setData().

You can also use request.setFormFields(), which will cause the IFrame
transport to be used instead of the XMLHttp transport, and it will submit a
form similarly to what you've done in your function.

Derrell


> ****
>
> ** **
>
> postToUrl : function(url, params, newWindow)****
>
>                         {****
>
>                                                var form =
> document.createElement('form');****
>
>                                                form.action = url;****
>
>                                                form.method = 'POST';****
>
>                                                if(newWindow){ form.target =
> '_blank'; }****
>
> ** **
>
>                                                for (var i in params) ****
>
>                                                {****
>
>                                                                        if
> (params.hasOwnProperty(i)) {****
>
>
> var input = document.createElement('input');****
>
>
> input.type = 'hidden';****
>
>
> input.name = i;****
>
>
> input.value = params[i];****
>
>
> form.appendChild(input);****
>
>                                                                        }**
> **
>
>                                                }****
>
> ** **
>
>                                                // Submit the form, then
> remove it from the page****
>
>
> document.body.appendChild(form);****
>
>                                                form.submit();****
>
>                         },****
>
> ** **
>
> ** **
>
> ****
>
> ** **
>
> *SAKsystems*
>
> Inh. **Mustafa Sak******
>
> Varrelmannstr. 16****
>
> 30453 ****Hannover********
>
> Tel.   +49 511 / 165 969 40****
>
> Fax   +49 511 / 165 969 49****
>
> Mobil +49 163 / 312 6144****
>
> http://www.saksys.de****
>
> [email protected]****
>
> STEUER-Nr. 2613817458****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to