Ask a Question related to ASP, Design and Development.

  1. #1

    Default 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


    Gaze Guest

  2. Similar Questions and Discussions

    1. Format text in text area
      I have a text area on a form and I need a way to recognize when a user enters a line break. I want to send the data in the box to a database and...
    2. Text::Format bug
      $ ruby -v ruby 1.8.0 (2003-08-04) $ ruby -e "require 'text/format'; Text::Format.new.paragraphs(' ')"...
    3. to format text in a form( on the fly )
      Hello all, I'm interested in finding out how to format text on the fly in a form. i.e : the user can select some text and then click on a...
    4. Text format not corresopnding, HELP
      To All I sent the mail via the CDONTS after,the message content not corresponding format of my sent before, PLEASE TEACH ME HOW CAN ME DO? And...
    5. Text Format String - Please help
      Hi, I need to display a DateTime field in 'mm/dd/yyyy' in a DataGrid.. On myGrid1 - Properties - Columns - myColumn1 - Text format string: I...
  3. #2

    Default Re: text format

    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 - [url]http://WilliamTasso.com[/url]


    William Tasso Guest

  4. #3

    Default Re: text format

    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" <ngx@tbdata.com> wrote in message
    news:uvitoqcaDHA.1816@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 - [url]http://WilliamTasso.com[/url]
    >
    >

    Gaze Guest

  5. #4

    Default Re: text format

    On Sun, 24 Aug 2003 02:39:59 GMT, "Gaze" <dunggaze@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" <ngx@tbdata.com> wrote in message
    >news:uvitoqcaDHA.1816@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.


    Dan Brussee Guest

  6. #5

    Default Re: text format

    In news:kiggkvsp3eu3bcm9tleimnlpvecj2e7led@4ax.com,
    Dan Brussee <dbrussee@NOSPAMnc.rr.com> typed:
    : On Sun, 24 Aug 2003 02:39:59 GMT, "Gaze" <dunggaze@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" <ngx@tbdata.com> wrote in message
    :: news:uvitoqcaDHA.1816@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



    Don Verhagen Guest

  7. #6

    Default Re: text format

    I replace enter key chr(13) with <br>. The tab is chr(9)

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

    Lin Ma




    "Gaze" <dunggaze@yahoo.com> wrote in message
    news:lqQ1b.255285$hOa.169491@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
    >
    >

    Lin Ma Guest

  8. #7

    Default Re: text format

    I solved this issue by using

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

    Regards,

    Lin




    "rajesh" <rajesh_tamilan@yahoo.co.in> wrote in message
    news:egVcgb$aDHA.1492@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 @ [url]http://www.fuzzysoftware.com/[/url]
    > Comprehensive, categorised, searchable collection of links to ASP &
    ASP.NET resources...


    Lin Ma Guest

  9. #8

    Default Re: text format

    Great! thanks.

    "Lin Ma" <a@a.com> wrote in message
    news:u3vd6K%23aDHA.1748@TK2MSFTNGP12.phx.gbl...
    > I replace enter key chr(13) with <br>. The tab is chr(9)
    >
    > Replace(yourRecord, chr(13), "<br>")
    >
    > Lin Ma
    >
    >
    >
    >
    > "Gaze" <dunggaze@yahoo.com> wrote in message
    > news:lqQ1b.255285$hOa.169491@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
    > >
    > >
    >
    >

    Gaze Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139