Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bioagentX

Text formatting in HTML

This topic is 5282 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay, I know the topic looks really basic, but I need some help. Here is my predicament: I want the user to enter information into a textarea. The information is then inserted into a database, and displayed on a different page. I want to make it so that the textarea has a soft wrap, but I want the carriage returns that the user enters in the textfield to be displayed in the database. Does anyone know a way to accomplish this? In less words, I''m asking : "Does anyone know a way to make a textfield with a soft wrap that will record carriage returns in the field to be displayed later?" I know it''s difficult to understand, ask me to clarify if confused. Thanks for your help, --BioX

Share this post


Link to post
Share on other sites
Advertisement
I think I get what you''re saying. You want the auto-word-wrapped carriage returns to be ignored, when data is sent to the server, but you want the manual-user-entered carriage returns to remain within the data when it is sent to the server. Correct?

A quick google turned up this:

<TEXTAREA NAME="SOFT" COLS=25 ROWS=5 WRAP=SOFT>

Maybe you already tried that, though, and it ignored manually entered new-lines as well. If so, I can''t help you. But if it does do what you want, then Yay!

Share this post


Link to post
Share on other sites
Have you tried searching the returned string for cr10 + cr13 (Line feed and carriage return, possibly backwards)?

(You could throw the string from the DB into ''pre'' tags)

Jay

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!