| View previous topic :: View next topic |
| Author |
Message |
Del Murray Guest
|
Posted: Mon May 14, 2007 6:05 pm Post subject: Formatting Floats |
|
|
Does anyone have a source for a good number formatting routine ??
When formating currency for html output, "formatfloat" wont allow you to
right justify the output so that currency fields line up with other currency
fields above them. I have never found where it allowed a "suppressed zero"
place holder in the output. I guess I could write one real quick but thought
maybe someone has a few lines of code to toss my way.
TIA
Del |
|
| Back to top |
|
 |
Richard Bakos Guest
|
Posted: Mon May 14, 2007 7:57 pm Post subject: Re: Formatting Floats |
|
|
Del Murray wrote:
Hi Del,
| Quote: | When formating currency for html output, "formatfloat" wont allow you to
right justify the output so that currency fields line up with other currency
fields above them. I have never found where it allowed a "suppressed zero"
place holder in the output. I guess I could write one real quick but thought
maybe someone has a few lines of code to toss my way.
|
Can you wrap the output in a <div> and float that right in the
container? Also, the <td> tag does have the align attribute.
- Rich Bakos |
|
| Back to top |
|
 |
Del Murray Guest
|
Posted: Mon May 14, 2007 8:23 pm Post subject: Re: Formatting Floats |
|
|
Rich,
Yea the <td does have align but the <input type=text doesn't have an align .
If you have a stack of text boxes and different size amounts , it looks like
crap because everything keeps coming out left justified unless you force
blanks onto the front of the small numbers so that they push to the right
and the decimal places all line up .
I'm a neat-freak I guess
Del |
|
| Back to top |
|
 |
Richard Bakos Guest
|
Posted: Mon May 14, 2007 10:49 pm Post subject: Re: Formatting Floats |
|
|
Del Murray wrote:
| Quote: | Yea the <td does have align but the <input type=text doesn't have an align .
If you have a stack of text boxes and different size amounts , it looks like
crap because everything keeps coming out left justified unless you force
blanks onto the front of the small numbers so that they push to the right
and the decimal places all line up .
|
You can cheat it with a style -
<input type="text"; size="25"; style="Text-Align: Right;">
Rich |
|
| Back to top |
|
 |
Del Murray Guest
|
Posted: Mon May 14, 2007 11:19 pm Post subject: Re: Formatting Floats |
|
|
Darn, .. I knew that ... it was filed in the back of the back drawer in the
back of my head ...
I gotta get a vacation'
Thanks Rich |
|
| Back to top |
|
 |
Richard Bakos Guest
|
Posted: Tue May 15, 2007 12:23 am Post subject: Re: Formatting Floats |
|
|
Del Murray wrote:
| Quote: | Darn, .. I knew that ... it was filed in the back of the back drawer in the
back of my head ...
|
Lol! I had to go look at some of our source to see how we did it... |
|
| Back to top |
|
 |
|