<textarea id="str"> </textarea> <br /> <script> document.write("Length : " + document.getElementById("str").value.length + "<br />"); for (i=0; i < document.getElementById("str").value.length; ++i) { document.write("Char Code at position " + i + " : " + document.getElementById("str").value.charCodeAt(i) + "<br />"); } </script> IE says the length is 2 but FireFox says its 1. You can also see the char code that is being used for the carrage returns.
_____ From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Scott Sent: Wednesday, 11 April 2007 2:51 AM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: CF reports different length than JS Steve, I thought that IE was the same and that a return was \n, I know I use that in JS all the time and it never complains, and works as expected. But Taco, yeah an example string would be good. Andrew Scott Senior Coldfusion Developer Aegeon Pty. Ltd. www.aegeon.com.au Phone: +613 8676 4223 Mobile: 0404 998 273 From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steve Onnis Sent: Wednesday, 11 April 2007 2:38 PM To: cfaussie@googlegroups.com Subject: [cfaussie] Re: CF reports different length than JS 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 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---