473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

text format

Hi,

I use <textarea> input more than one paragraph to the database, whose field
type is set to "text". Then I retrieve it to display in <textarea>, which is
OK, paragraph by paragraph, but not in the other tabs because of no <P> or
<br> between each paragraph. Is there any solution to display in other tabs
than <textarea> paragraph by paragraph. Or do I have to change the database
field type other than text? And which type is good in this case. Thanks for
any idea.

Ga
Jul 19 '05 #1
7 4583
Gaze wrote:
Hi,

I use <textarea> input more than one paragraph to the database, whose
field type is set to "text". Then I retrieve it to display in
<textarea>, which is OK, paragraph by paragraph, but not in the other
tabs because of no <P> or <br> between each paragraph. Is there any
solution to display in other tabs than <textarea> paragraph by
paragraph. Or do I have to change the database field type other than
text? And which type is good in this case. Thanks for any idea.


You want a regular expression that globally replaces <cr/lf> with the
required HTML tags
--
William Tasso - http://WilliamTasso.com
Jul 19 '05 #2
I don't see "cr/lf" in the http source code, but \r\n in database when I use
an sofeware to display the records.

"William Tasso" <ng*@tbdata.com> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
Gaze wrote:
Hi,

I use <textarea> input more than one paragraph to the database, whose
field type is set to "text". Then I retrieve it to display in
<textarea>, which is OK, paragraph by paragraph, but not in the other
tabs because of no <P> or <br> between each paragraph. Is there any
solution to display in other tabs than <textarea> paragraph by
paragraph. Or do I have to change the database field type other than
text? And which type is good in this case. Thanks for any idea.


You want a regular expression that globally replaces <cr/lf> with the
required HTML tags
--
William Tasso - http://WilliamTasso.com

Jul 19 '05 #3
On Sun, 24 Aug 2003 02:39:59 GMT, "Gaze" <du******@yahoo.com> wrote:
I don't see "cr/lf" in the http source code, but \r\n in database when I use
an sofeware to display the records.

"William Tasso" <ng*@tbdata.com> wrote in message
news:uv**************@TK2MSFTNGP09.phx.gbl...
Gaze wrote:
> Hi,
>
> I use <textarea> input more than one paragraph to the database, whose
> field type is set to "text". Then I retrieve it to display in
> <textarea>, which is OK, paragraph by paragraph, but not in the other
> tabs because of no <P> or <br> between each paragraph. Is there any
> solution to display in other tabs than <textarea> paragraph by
> paragraph. Or do I have to change the database field type other than
> text? And which type is good in this case. Thanks for any idea.
>


The suggestion is more generic. Replace newline characters with
appropriate HTML tags. Just watch out for things like your example of
\r\n - which would show one line break, but if you use a global
search/replace regular expression and replace \r AND \n with <br> then
you will end up with 2 breaks. Either you need to know that ALL breaks
are the combination of \r\n or you need to do some other fancy
footwork.
Jul 19 '05 #4
In news:ki********************************@4ax.com,
Dan Brussee <db******@NOSPAMnc.rr.com> typed:
: On Sun, 24 Aug 2003 02:39:59 GMT, "Gaze" <du******@yahoo.com> wrote:
:
:: I don't see "cr/lf" in the http source code, but \r\n in database
:: when I use an sofeware to display the records.
::
:: "William Tasso" <ng*@tbdata.com> wrote in message
:: news:uv**************@TK2MSFTNGP09.phx.gbl...
::: Gaze wrote:
:::: Hi,
::::
:::: I use <textarea> input more than one paragraph to the database,
:::: whose field type is set to "text". Then I retrieve it to display in
:::: <textarea>, which is OK, paragraph by paragraph, but not in the
:::: other tabs because of no <P> or <br> between each paragraph. Is
:::: there any solution to display in other tabs than <textarea>
:::: paragraph by paragraph. Or do I have to change the database field
:::: type other than text? And which type is good in this case. Thanks
:::: for any idea.
::::
:::
:
: The suggestion is more generic. Replace newline characters with
: appropriate HTML tags. Just watch out for things like your example of
: \r\n - which would show one line break, but if you use a global
: search/replace regular expression and replace \r AND \n with <br> then
: you will end up with 2 breaks. Either you need to know that ALL breaks
: are the combination of \r\n or you need to do some other fancy
: footwork.

Or execute a regexp twice:
1st) replace the 1 pair first \r\n
2nd) replace the \r or \n (can't remember which)

Don

Jul 19 '05 #5
I replace enter key chr(13) with <br>. The tab is chr(9)

Replace(yourRecord, chr(13), "<br>")

Lin Ma


"Gaze" <du******@yahoo.com> wrote in message
news:lq*********************@news02.bloor.is.net.c able.rogers.com...
Hi,

I use <textarea> input more than one paragraph to the database, whose field type is set to "text". Then I retrieve it to display in <textarea>, which is OK, paragraph by paragraph, but not in the other tabs because of no <P> or
<br> between each paragraph. Is there any solution to display in other tabs than <textarea> paragraph by paragraph. Or do I have to change the database field type other than text? And which type is good in this case. Thanks for any idea.

Ga

Jul 19 '05 #6
I solved this issue by using

<% response.write Replace(yourRecord, chr(13), "<br>") %>

Regards,

Lin


"rajesh" <ra************@yahoo.co.in> wrote in message
news:eg**************@TK2MSFTNGP12.phx.gbl...
hai lin
i also getting the same problem
if u solved textarea prob
plz mail me
-rajesh
india

************************************************** ********************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP &

ASP.NET resources...
Jul 19 '05 #7
Great! thanks.

"Lin Ma" <a@a.com> wrote in message
news:u3****************@TK2MSFTNGP12.phx.gbl...
I replace enter key chr(13) with <br>. The tab is chr(9)

Replace(yourRecord, chr(13), "<br>")

Lin Ma


"Gaze" <du******@yahoo.com> wrote in message
news:lq*********************@news02.bloor.is.net.c able.rogers.com...
Hi,

I use <textarea> input more than one paragraph to the database, whose field
type is set to "text". Then I retrieve it to display in <textarea>, which is
OK, paragraph by paragraph, but not in the other tabs because of no <P>

or <br> between each paragraph. Is there any solution to display in other

tabs
than <textarea> paragraph by paragraph. Or do I have to change the

database
field type other than text? And which type is good in this case. Thanks

for
any idea.

Ga


Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Trader | last post by:
Hi, I'm trying to use Mark Hammond's win32clipboard module to extract more complex data than just plain ASCII text from the Windows clipboard. For instance, when you select all the content on...
27
by: Eric | last post by:
Assume that disk space is not an issue (the files will be small < 5k in general for the purpose of storing preferences) Assume that transportation to another OS may never occur. Are there...
10
by: Rogue Chameleon | last post by:
Hi all I have a input filed of type "textbox" into which I am expecting to get currency values (ie. 199.99). Is there a way that I can restrict the user to only entering 2 values after the...
2
by: Big D | last post by:
Hi all, I'm working on a little app that will go through a text file (right now a "rich text" document), and parse it into a pseudo-html that our flash programmers can use in their presentation....
1
by: msmcg | last post by:
I need to format the data in some textboxes using the Binding method with custom Currency and ShortDate format and parse handlers. Here is the code that I am using. I call it on the form load...
10
by: Kenneth Brody | last post by:
I recently ran into an "issue" related to text files and ftell/fseek, and I'd like to know if it's a bug, or simply an annoying, but still conforming, implementation. The platform is Windows,...
16
by: Neil | last post by:
I posted a few days ago that it seems to me that the Access 2007 rich text feature does not support: a) full text justification; b) programmatic manipulation. I was hoping that someone might...
6
by: BerkshireGuy | last post by:
On an unbound form, I have a combobox called 'cboproducttype' and a text box called 'txtamountappliedfor'. I have an Add button that I would like the user to be able to hit once a product and...
4
by: wildman | last post by:
RE: Replacing Text without changing case?? This code works great, but case has to be exact. Research.Text = Research.Text.Replace(textboxSearch.Text, "<b>" + textboxSearch.Text + "</b>") ...
1
by: =?Utf-8?B?UmljaA==?= | last post by:
In the Registry at HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text the default key for Text Format is: "Format" = "CSVDelimited" I can use the following OleDB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.