Yes, I realized that after his explanation.

Rey

Andy Matthews wrote:
He's only using CF to print javascript Rey.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Rey Bango
Sent: Friday, June 22, 2007 4:36 PM
To: [email protected]
Subject: [jQuery] Re: Coldfusion / Jquery Addition Operator Question


Thats because jQuery is a client-side lib and you're trying to use it within
CF. CF won't recognize jQuery's methods.

Rey...

cfdvlpr wrote:
I'm trying to add numbers together like this:

 var tpdSum = 0;
 tpdSum = 0
         <cfloop from="1" to="#arrayLen(session.cart)#" index="i">
                          + $(tpd_#i#).text()
         </cfloop>;

alert(tpdSum);

But, instead of adding them, I'm getting a variable that looks like
this:  0  2  5
So, it's treating the numbers as strings and concatenating them instead of treating them like numbers and adding them.
What am I doing wrong?



--
BrightLight Development, LLC.
954-775-1111 (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com




--
BrightLight Development, LLC.
954-775-1111 (o)
954-600-2726 (c)
[EMAIL PROTECTED]
http://www.iambright.com

Reply via email to