/    Sign up×
Community /Pin to ProfileBookmark

textarea, <BR>tag, DB store, <TD>

i input something text include chr(13) into TEXTAREA tag, and then, i store them into a LONG VARCHAR field.

when i retrieve the text from DB2 database, and display them with TEXTAREA tag£¬all seem OK, what i input what i retrieved. but when i put them text into a TD tag, it’s awful that every line of text has not been separated with chr(13) or BR tag.

i don’t know why it’s different result between displaying with TEXTAREA and TD tag?

sorry, my english is so poor. i dont know whether i can express my meaning exactly.

Thank you very much for your help!

to post a comment
Java

2 Comments(s)

Copy linkTweet thisAlerts:
@buntineOct 21.2004 — I dont th8ink I understand correctly. But I will have a go!

You may want to replace the <br> tags with n. Text Areas dont interpret HTML tags so you will have to use the n escape sequence to create line breaks.

Regards.
Copy linkTweet thisAlerts:
@ray326Oct 21.2004 — Try wrapping the field data in a <pre>.
×

Success!

Help @rickqin spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...