Okay, I have a little more information.  If I do a normal form post in
Firefox, then look into Firebug to see the information that's actually
posted, I see this:

Content-Type: application/x-www-form-urlencoded
Content-Length: 40
subject=hi+hi+hi&body=hi%0D%0Ahi%0D%0Ahi

However, if I then do the same post via Form.Request, and then examine
it in Firebug, I see this:
subject=hi%20hi%20hi&body=hi%0Ahi%0Ahi&

I'm not sure why the regular form post would have "+" signs, whereas
the AJAX post would have %20, but of more interest to me is the fact
that in the AJAX post, there is no %0D at all.  I'm not sure why the
Ajax form post would strip out chr(13) before posting.

I'm totally stumped.  little help?


On Oct 8, 3:16 pm, hairbo <[email protected]> wrote:
> Hi,
>
> Apologies up front for not setting up a jsfiddle for this, but I
> couldn't figure out how to dump the results of an AJAX form post in
> jsfiddle.
>
> Anyway, I've got a simple form, like this:
>
> <form action="post.cfm" method="post" id="myform">
>         <input type="text" name="subject" value="" />
>         <textarea name="body"></textarea>
>         <button type="submit">Submit</button>
> </form>
>
> If I type in some data with carriage returns, post the data normally,
> then look at the character codes for each characters, I'll see 13 10
> for any returns, which is what I'd expect.
>
> However, if I submit the identical data using Form.Request in Safari
> (Snow Leopard *and* Windows 7), Chrome and Firefox, like this:
> <div id="return"></div>
>
>         var formsubmit = new Form.Request (
>                         $('myform'),
>                         $('return')
>                 )
>
> ...and then look at the character codes, all the "13" codes are just
> gone, so all I see are "10"s for line breaks.  Obviously, this screws
> things up.
>
> I've never seen this before, and I've certainly used Form.Request in
> the past, so I'm sort of beating my head against a wall.  I've tested
> this both on my laptop (Windows 7, IIS 7, ColdFusion 9), and our
> production box (Windows Server 2003, IIS6, ColdFusion 8), and get the
> same results.
>
> Any ideas/suggestions much appreciated.

Reply via email to