• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Text Content - How to insert Return code in textfield?

Guest
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

Hi,
I am working on textfield form that enable user to insert text and save in SQL database as long text datatype. User able to retrieve the saved text and display in the web page as article.

The problem I am facing at the moment is the article containing RETURN/ENTER or new paragraph. When I query the article it become one single paragraph as I understand there is a code I need to insert when user hit on returrn/enter key before I save in SQL database.

Anyone that know what code I need to add and how I can do to auto detect when user hit on return/enter key in textfield form.

Thanks,
Eric
TOPICS
Advanced techniques

Views

342

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Jul 11, 2007 Jul 11, 2007
Thanks Daverms and Azadi for the inputs.

I choosed Daverms method for input and stored in database and display I using REReplace() from Azadi.

Thanks guys.

Votes

Translate

Translate
LEGEND ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

using replace(), listchangedelims() or similar function of you choice
change all occurrences of #chr(10)# and #chr(13)# to, say, <br>

suggestion: if you use a wysiwyg editor like tinymce or fckeditor, they
can do it for you, plus your users can format their text (i.e. bold,
italic, and a ton of other customizable formatting)

---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jul 10, 2007 Jul 10, 2007

Copy link to clipboard

Copied

Hi,

This tutorial can help you to solve your issue...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

LATEST
Thanks Daverms and Azadi for the inputs.

I choosed Daverms method for input and stored in database and display I using REReplace() from Azadi.

Thanks guys.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation