<!-- I have the following in a form, on the local it will provide the calculations not once online though, and won’t perform the formatCurrency at all anytime. I know what I need, just not getting it in the right “language” in the code…/–>
<HTML>
<HEAD>
<META HTTP-EQUIV=“Content-Type” CONTENT=“text/html; charset=windows-1252”>
<META HTTP-EQUIV=“Content-Language” CONTENT=“en-us”>
<TITLE>Worksheet</TITLE>
<SCRIPT LANGUAGE=“JavaScript”>
<!-- Original: Cyanide_7
<!-- Begin
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,‘’);
if(isNaN(num))
num = “0”;
sign = (num == (num = Math.abs(num)));
num = Math.floor(num100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = “0” + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4i+3))+‘,’+
num.substring(num.length-(4*i+3));
return (((sign)?‘’:‘-’) + ‘$’ + num + ‘.’ + cents);
}
// End –>
</script>
</HEAD>
<BODY background=“…/…/images/logos/backgrounds/0796089L2.jpg”>
<form method=“POST” name=“Worksheet” action=“–WEBBOT-SELF–” onSubmit=“return Worksheet_Validator(this)” language=“JavaScript”>
<table border=“1” width=“1361” height=“574” bordercolor=“#FFFFFF” cellpadding=“0”>
<tr>
<td width=“22” height=“65”> </td>
<td width=“94” height=“65”></td>
<td width=“172” height=“65”><em>Quilt Size:</em></td>
<td width=“598” colspan=“6” height=“65”><i>Enter Quilt Width: </i> <!–webbot
bot=“Validation” S-Display-Name=“Quilt Width” S-Data-Type=“Number”
S-Number-Separators=“,.” B-Value-Required=“TRUE” –> <INPUT NAME=“Product_Quilt_Width” SIZE=5>
<i>Enter Quilt Length: </i> <!–webbot bot=“Validation”
S-Display-Name=“Quilt Length” S-Data-Type=“Number”
S-Number-Separators=“,.” B-Value-Required=“TRUE” –> <INPUT NAME=“Product_Quilt_Length” SIZE=5> <p><i>Multiply
Quilt Width by Quilt Length, This is your Total Square Inches</i>
<input type=text name=Total_Square_Inches onblur=“document.Worksheet.Total_Square_Inches.value = document.Worksheet.Product_Quilt_Width.value * document.Worksheet.Product_Quilt_Length.value;” size=“10” READONLY> <br>
</p>
</td>
<td width="429" height="65"> </td>
</tr>
<input type="radio" value="Basting Only" name="Quilting" >
Basting <input type=text name=Quilting_Basting
onfocus="document.Worksheet.Quilting_Basting.value = document.Worksheet.Total_Square_Inches.value * .01;"
onblur="document.Worksheet.Quilting_Basting.value=formatCurrency(this.form.value);" size="10" value="$0" READONLY>
4" Grid Only<br>
</BODY>