My page runs fine...I just get the yeld sign with a "!" in it.
Ok, I asked this question in the VBscript group and they tell me it's a
JavaScript issue even though I don't get the error until I introduce the
VBscript to the page. Please look at it.
I'm getting the following error message on my page.
The function
function formatCurrency(strValue)
11{
12 strValue2 = strValue.toString().replace(/\$|\,/g,'');
13 dblValue = parseFloat(strValue2);
14
15 blnSign = (dblValue == (dblValue = Math.abs(dblValue)));
16 dblValue = Math.floor(dblValue*100+0.50000000001);
17 intCents = dblValue%100;
18 strCents = intCents.toString();
19 dblValue = Math.floor(dblValue/100).toString();
20 if(intCents<10)
21 strCents = "0" + strCents;
22 for (var i = 0; i < Math.floor((dblValue.length-(1+i))/3); i++)
23 dblValue = dblValue.substring(0,dblValue.length-(4*i+3))+','+
24 dblValue.substring(dblValue.length-(4*i+3));
25 return (((blnSign)?'':'-') + '$' + dblValue + '.' + strCents);
26}
<script language="JavaScript">document.write(formatCurrenc y(<%=Request.Form
("total")%>))</script></span>
I get no errors if I take out the VB and use a real number...
<script language="JavaScript">document.write(formatCurrenc y(77))</script>
Any thoughts?