Re: Cost Calculation Function With Parsed Numbers to Currency: Need Help Combining Functions



With neither quill nor qualm, Fred quothed:

>
> >
> >It should be easy to strip the $ before processing, no??
>
>
> I was thinking after processig.
>
> How would you do it? Can you post an example?

Well, in javascript it'd be simply:

var a;
....
....
a=a.slice(1);

(You could also use regexp replace.)

If you have to verify whether or not the "$" is there:

if (a.slice(0,1)=="$") {
a=a.slice(1);
}

There's similar functions in php, etc.

--
Neredbojias
Contrary to popular belief, it is believable.
.



Relevant Pages