On Wed, Apr 23, 2008 at 8:11 AM, Dan, Trif <[EMAIL PROTECTED]> wrote:
> Hi,
>   I get the following error when trying to make a request containing a
>  string parametter with a very large size (over 500 characters):
>
>  4546437 ERROR: qx.io.remote.XmlHttpTransport[9501]: Failed to send data:
>  [Exception... "Component returned failure code: 0x80004005
>  (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]" nsresult: "0x80004005
>  (NS_ERROR_FAILURE)" location: "JS frame :: javascript:
>  eval(__firebugTemp__); :: anonymous :: line 1" data: no]: send
>
>  ... this error occured on Firefox 2.X. In IE the maximum text size is
>  smaller. From this error i understood that is a browser exception
>  generated by the AJAX XMLHttpRequest object.
>
>  Any ideea on how should I use the request to send that parametters
>  content to the backend (in my case the content from a text area).
>  I use the following code to send the request:
>             var request = new qx.io.remote.Request(url, "POST",
>  qx.util.Mime.JSON);
>             request.setAsynchronous(false);
>             request.setRequestHeader("Content-Type", "application/json");
>             request.setParameter("largeContent", largeTextContent);
>             request.send();

setParameter() explicitly requests that the largeTextContent be passed
as a prameter in the URL.  You're hitting the limit on URL length.
The solution, as long as you don't need to use synchronous requests
(which you should never be using anyway) or cross-domain requests, is
to call

  request.setFormField("largeContent", largeTextContent);

Cheers,

Derrell

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to