Steve Baerthlein
February 12th, 2003, 03:41 AM
hi there,
can I get the amount of pixel out of the length of an string in JavaScript?
I have a table with several columns and each of this column has a fixed height and width. Now I want to put some text into the columns (TDs) and if the text ist too long to fit into the column HTML will normally strech the TD or make a new line, this is what I want to avoid. The result should look like in the WinExplorer, if you cut the text there should be concatinated '...' at the end of the cutted string.
So at least I need to have a functionallity to get the width of a letter in pixel depending on the chosen font aso...
thanx for your patience,
just a rookie.
can I get the amount of pixel out of the length of an string in JavaScript?
I have a table with several columns and each of this column has a fixed height and width. Now I want to put some text into the columns (TDs) and if the text ist too long to fit into the column HTML will normally strech the TD or make a new line, this is what I want to avoid. The result should look like in the WinExplorer, if you cut the text there should be concatinated '...' at the end of the cutted string.
So at least I need to have a functionallity to get the width of a letter in pixel depending on the chosen font aso...
thanx for your patience,
just a rookie.