I have a Unit.class file that has various "handy" classes and functions that I want to use in a simple JavaScript in HTML. How do I reference unit.class so that I can use it? For example, I want to instantiate a Quantity variable and use its methods SetTo and GetAs:
Code:
<script type="text/javascript">
<!--
function Translate(UnitForm)
{
Quantity q = new Quantity( UnitForm.x.value );
q.SetTo( UnitForm.y.value );
return q.GetAs( UnitForm.z.value );
}
//-->
</script>
Comment