Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to stop text from breaking

Status
Not open for further replies.

blueindian1

Programmer
Apr 24, 2001
150
US
hello,

i have large numbers on a form. say 10 or 15 digits. it's supposed to look like this(for example):
$999,999,999,999,999.00

if one happens to be negative, the the number will break and look like this
$-
999,999,999,999,999.00

how do i stop that?

thanks,

rich
 
Try using a TextArea, or a bigger text input line.

I work with very large numbers on my calculator and the only way to avoid problems was to use a textarea:


Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
thanks, but i don't have that option. anybody else have any ideas?

thanks
 
Rich,

Are you saying you are not able to change the input type, nor the size of the input text field?

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
correct. the numbers are comming out of a database and i have no control over them. they must be displayed as text within a table, so a text area is not an option.
 
If you're not using a textarea already, then how can the number break?

Is this just text in a table cell, then?

Code:
<table>
  <tr>
    <td>$999,999,999,999,999.00</td>
    <td>$-999,999,999,999,999.00</td>
    <td>$999,999,999,999,999.00</td>
  </tr>
  <tr>
    <td>$-999,999,999,999,999.00</td>
    <td>$-999,999,999,999,999.00</td>
    <td>$999,999,999,999,999.00</td>
  </tr>
</table>

Like that?

Cheers,


[monkey] Edward [monkey]

&quot;Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!&quot; -- inventor of the cat door
 
Hi there,

If your text is inside a table cell try this:

<TABLE>
<TR>
<TD NOWRAP>
$-999,999,999,999,999.00
</TD>
</TR>
</TABLE>

&quot;NOWRAP&quot;... well, prevents the cell from wrapping the contents.

Hope this help you §;O)

Regards


Jakob


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top