date format

H

HandersonVA

document.testform.itemprice.value = itemprice;

when I set the value as above, the output shows like this, 25.0200 and
it should be
25.02

how can I make it happen?
 
R

Randy Webb

HandersonVA said the following on 5/25/2006 3:29 PM:
document.testform.itemprice.value = itemprice;

Variable name with the same name as a Form Input? IE probably loves
that.....
when I set the value as above, the output shows like this, 25.0200 and
it should be
25.02
how can I make it happen?

Strip the trailing zeroes?

+itemprice;
 
D

Dr John Stockton

JRS: In article <[email protected]>, dated Thu, 25 May
2006 18:05:54 remote, seen in Randy Webb
HandersonVA said the following on 5/25/2006 3:29 PM:

Strip the trailing zeroes?

+itemprice;

Somewhat naive as a solution ; it answers the question as asked, but
fails to foresee the question that is likely to follow unless the OP
reads newsgroup FAQ 4.6 (via sig line 2) (in which after the first link
should now be <i>ff.</i>).
 
R

Randy Webb

Dr John Stockton said the following on 5/26/2006 1:11 PM:
JRS: In article <[email protected]>, dated Thu, 25 May
2006 18:05:54 remote, seen in Randy Webb


Somewhat naive as a solution ;

There is nothing "naive" about a solution that does precisely what the
OP asked for.
it answers the question as asked,

Then the only thing "naive" about it is your response.
but fails to foresee the question that is likely to follow unless the OP
reads newsgroup FAQ 4.6 (via sig line 2) (in which after the first link
should now be <i>ff.</i>).

That is a naive belief on your part.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,062
Latest member
OrderKetozenseACV

Latest Threads

Top