Hello,
I have been trying to send the data from the editor to my server via an XmlHttpRequest post.
I have taken it as it is returned from GetData(true), but it is truncated when it arrives in the server.
Has anyone had this problem ?
What needs to be done to the returned data (raw html), before sending it to the server ?
Best regards
Simon
Fri, 10/17/2008 - 10:39
#1
Re: Posting editor contents with XMLHTTPRequest
"truncated" sounds like you might be posting using an XMLHTTPRequest GET method instead of POST method. No other suggestions, though.
Re: Posting editor contents with XMLHTTPRequest
Ok, here is the answer to this problem.
Firstly, no I was really doing a POST and not a GET.
To get this to work correctly, we have to use the javascript function encodeURIComponent(...).
Example :
Re: Posting editor contents with XMLHTTPRequest
Makes sense. As part of the XMLHTTPRequest POST, I was thinking you had to set the content type to application/x-www-form-urlencoded. Glad you found the answer!