HTML Textarea
In a bulleting board style of textarea how do you keep the formatting consistant with the user's input? When using this UBB if I click enter
the text starts a few lines down. What would cause that to stay in the same format in a database?
Would I use
tags before and after each textarea so next time it's displayed it's done the same way?
Busy posted this at 03:42 — 3rd October 2001.
He has: 6,151 posts
Joined: May 2001
I'm only guessing here, but I'd say the code (php) uses \n (newline) for carriage returns (enter)
enter = br
If you use the pre tag it changes font style and size, you can use a font tag around it but isnt always the same result.
artsapimp posted this at 13:38 — 3rd October 2001.
They have: 330 posts
Joined: Apr 2000
a carriage return is Chr(13) in ASP. Do you have idea how I would apply that to a textarea?
Thanks.
Vincent Puglia posted this at 15:45 — 3rd October 2001.
They have: 634 posts
Joined: Dec 1999
Hi artsapimp,
if I remember my ascii code correctly:
\n = charCode 13
\r = charCode 10
some dbms use both, so "\n\r" (or vice versa)
Vinny
artsapimp posted this at 15:56 — 3rd October 2001.
They have: 330 posts
Joined: Apr 2000
yes, thank you.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.