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.toStri ng().replace(/\$|\,/g,'');
13 dblValue = parseFloat(strV alue2);
14
15 blnSign = (dblValue == (dblValue = Math.abs(dblVal ue)));
16 dblValue = Math.floor(dblV alue*100+0.5000 0000001);
17 intCents = dblValue%100;
18 strCents = intCents.toStri ng();
19 dblValue = Math.floor(dblV alue/100).toString() ;
20 if(intCents<10)
21 strCents = "0" + strCents;
22 for (var i = 0; i < Math.floor((dbl Value.length-(1+i))/3); i++)
23 dblValue = dblValue.substr ing(0,dblValue. length-(4*i+3))+','+
24 dblValue.substr ing(dblValue.le ngth-(4*i+3));
25 return (((blnSign)?'': '-') + '$' + dblValue + '.' + strCents);
26}
<script language="JavaS cript">document .write(formatCu rrency(<%=Reque st.Form
("total")%>) )</script></span>
I get no errors if I take out the VB and use a real number...
<script language="JavaS cript">document .write(formatCu rrency(77))</script>
Any thoughts?