Ok you have a number of options, in this case you could create a dive and
use DHMTL to place the string into the div then use the inspect to view the
data inside the div. I use dojo and it has a brilliant debug option which
not only shows the string but it as an object, which shows \n\n\n String
text \n\n more text 

 

But I can't answer 100% sure if doing this and going to the dom would be
sufficient enough.

 

You could try console.log(string); never used it but you it might have
options to view more details about the string or object in question.



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Wednesday, 11 April 2007 3:25 PM
To: [email protected]
Subject: [cfaussie] Re: CF reports different length than JS

 

Andrew,

 

installed firebug, not sure how to check the string out, any tips?

 

On 4/11/07, Andrew Scott <[EMAIL PROTECTED]> wrote: 

Taco,

 

Do you have firebug installed in FF? Might pay to use that to check the
string out.

 



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au <http://www.aegeon.com.au/> 
Phone: +613  8676 4223
Mobile: 0404 998 273

 

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Wednesday, 11 April 2007 3:01 PM 


To: [email protected]
Subject: [cfaussie] Re: CF reports different length than JS

 

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: [email protected] [mailto: [email protected]
<mailto:[email protected]> ] On Behalf Of Dale Fraser
Sent: Wednesday, 11 April 2007 2:34 PM
To: [email protected]
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: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Taco Fleur
Sent: Wednesday, 11 April 2007 2:15 PM
To: [email protected]
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 <http://www.pacificfox.com.au/>  
Web Design, Web development, Graphic Design and Complete Internet Solutions 
an industry leader with commercial IT experience since 1994 . 

 



Web Design, Web development, Graphic Design and Complete Internet Solutions
an industry leader with commercial IT experience since 1994 . 



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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to