take 3/8 out of quotes.  it's not a string.  it's a number.

you'll get 20.375.

or were you looking for 20 3/8?

On 7/17/07, Che Vilnonis <[EMAIL PROTECTED]> wrote:
> Looking to add an integer and a fraction. How do I do this with Javascript?
> Thanks, Che!
>
> <script language="JavaScript">
> var num = 20;
> var frac = "3/8";
> var DBWTemp = (num + frac);
> document.write(DBWTemp);
> </script>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283884
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to