fixed widths

liunx

Guest
hi<br />
i recently came across a problem where a form was submitted but the text was one continuous string with no spaces.The html table treated it like one word and promptly expanded the table width as necesarry(two feet off the screen).Is there a fail safe way to avoid this, ie break the string so that it just wraps down the table as it would if it contained spaces<br />
<br />
cheers<br />
<br />
DaFunk<!--content-->Humm... I'm not sure I understood the question correctly but... <br />
<br />
If you have a form on your website that when submitted via email only comes up in an endless string, you need to add a bit of coding to make it otherwise.<br />
<br />
<form action="mailto:[email protected]" method="post" enctype="text/plain"><br />
<br />
Something like that. The enctype command makes the data be shown with spaces and linebreaks. If you in the same for want to include a file you can't use the above command but instead have to use "multipart/form-data". Hope it helped. :)<!--content-->:confused: I'm not sure what you're talking about? The form puts the information into a single line??<!--content-->hi<br />
im using asp to process the form input, the problem being, if the form input string is 10000 characters long(for instance) and there are no spaces in the string. The html will try to fit the whole string on one line,as if it is one word, this has the effect of automatically expanding the table width to fit all the characters on the same line. this isnt common but you get the odd rogue holding down all the keys believe it or not.<br />
What i need is a table that will force a carriage return when the table width is reached <br />
<br />
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffff<br />
<br />
do you get it :P<br />
<br />
thanks for the response anyway<br />
<br />
Dafunk<!--content-->Yeah <br />
look at the above table width<!--content-->aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<br />
<br />
sorry but this was the only way<!--content-->yes, html will fill in a whole table cell with a value if it is in a continuous charecters with no breaks. This will mess up any formatting like widths and all. To get around this, youd need to use some javascript so insert <br> at every...? I dont know...maybe 20 charecters. Youd have to look at the field length, and parse it for every 20 chars, then add a <br> then parse whats left and do the same. This would give you a cell which appears to be wrapping. In a email output,. it would space your data DOWN the page instead of ACROSS> Let me ask, what kind of data field will have like 50 or more chars with no space?<!--content-->ok thanks<br />
<br />
i wasnt sure if i was doing the html wrong..<br />
<br />
normally everything is cool , but every now and then i get an idiot that just holds the key down like i did above..The problem is the table is within other tables and when it expands everything ends up all over the place..the only way then is to strip the string down like you said, but that means getting my brain out the cupboard :{<br />
<br />
thanks<!--content-->ya, I understand. I am working on a project which has many fields in table cells, and when the user does on of those...<br />
JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ<br />
things, it really messes the layout up. The first time we saw it we were all wondering what we did wrong! First we realized HTML wont wrap a continous charecter "word." Then we decided to accept any amount of input into a text field, but to only display the first fifteen charecters when we write the output to a table format. That helped us to keep the format looking good.<!--content-->
 
Back
Top