It is actually Firefox that creates the problem. I just tested it and IE is OK with the following random string. IE reports 400 chars and Firefox reports more, so it must be what Steve says and it uses \n\n for new lines. I guess we'll have to do some regex replacing, hmm wonder how this is going to affect things.... ----------------------------------
hfghdf gh dfhgdfgjk dfjkg kjdfnnjndfk nbjklcvnjkbn cvjknbjkncv jbncjvnbjkn cvjkbnjkcv jkbncjkvb jkcvjkbjkc vbjkncjkvn cv b cv b c v b cvb cvbcv bcvb cv b cv b cv b cv bc vb cv b cvbcvhfghdf gh dfhgdfgjk dfjkg kjdfnnjndfk nbjklcvnjkbn cvjknbjkncv jbncjvnbjkn cvjkbnjkcv jkbncjkvb jkcvjkbjkc vbjkncjkvn cv b cv b c v b cvb cvbcv bcvb cv b cv b cv b cv bc vb cv b cvbcvhfghdf gh dfhgdfgjk dfjk ---------------------------------- On 4/11/07, Steve Onnis <[EMAIL PROTECTED]> wrote: > > It actually depends on the browser. For example, in IE a return is \n\n > where in FireFox a return is \n so you get a different in length. In > Coldfusion a line break will be different also. I think thats where your > getting your lengths screwing up. > > Steve > > ------------------------------ > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Dale Fraser > *Sent:* Wednesday, 11 April 2007 2:34 PM > *To:* cfaussie@googlegroups.com > *Subject:* [cfaussie] Re: CF reports different length than JS > > > > Should be the same, > > > > Are you sure there are no funny characters that CF is stripping or JS. > > > > Can you post an example string where they are different. > > > > > > Regards > > Dale Fraser > > > > http://dale.fraser.id.au/blog > > > > *From:* cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Taco Fleur > *Sent:* Wednesday, 11 April 2007 2:15 PM > *To:* cfaussie@googlegroups.com > *Subject:* [cfaussie] CF reports different length than JS > > > > Hi all, > > > > I'm doing some server-side checking as well as client-side, and am finding > that CF7 reports a different length of characters than JavaScript does. > > > > Not sure about the internals of both functions, but am hoping I can sort > of get the two in sync. Anyone any ideas? > > > > len() VS obj.value.length > > > > I reckon it might have something to do with line breaks. > > > > Thanks in advance. > > -- > Taco Fleur - http://www.pacificfox.com.au > Web Design, Web development, Graphic Design and Complete Internet > Solutions > an industry leader with commercial IT experience since 1994 > > > > > > -- Taco Fleur - http://www.pacificfox.com.au Web Design, Web development, Graphic Design and Complete Internet Solutions an industry leader with commercial IT experience since 1994 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to cfaussie@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en -~----------~----~----~----~------~----~------~--~---