It seems to me you have two choices.  You can do it as a string (by 
converting the 20 to a string and adding a space and the fraction) or as 
a number, which will give you a decimal.  Which are you trying to 
accomplish?

--Ben Doom

Che Vilnonis 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 robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

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

Reply via email to