Professional Web Applications Themes

MS Access, Memo Return Breaks? - Macromedia Dynamic HTML

I am building a backend to a web site that allows the owner to update their text. I am having a problem getting the return breaks to display on the web page. E.g., when they type 3 paragraphs of text and submit, the text get crammed into one big glob of text. That's how it diplays on the public page. In MS access, how do I specify it to recognize returns? As always. your help is appreciated!...

  1. #1

    Default MS Access, Memo Return Breaks?

    I am building a backend to a web site that allows the owner to update their
    text. I am having a problem getting the return breaks to display on the web
    page. E.g., when they type 3 paragraphs of text and submit, the text get
    crammed into one big glob of text. That's how it diplays on the public page. In
    MS access, how do I specify it to recognize returns? As always. your help is
    appreciated!

    trocat Guest

  2. #2

    Default Re: MS Access, Memo Return Breaks?

    You need a function that converts line breaks into HTML <br /> tags, or into
    a set of HTML <p> tags. This is pretty much the most basic problem out there
    when dealing with submitted text, and there are plenty of pre-build
    solutions out there with varying levels of complexity. PHP, for example, has
    a built in function for handling this called nl2br, and the language you're
    using probably has one too.

    You can call it either when submitting the text (so the HTML tags are stored
    with the text in the database), or when the public page loads, which is
    easier but less efficient.

    Rob


    trocat wrote:
    > I am building a backend to a web site that allows the owner to update
    > their text. I am having a problem getting the return breaks to
    > display on the web page. E.g., when they type 3 paragraphs of text
    > and submit, the text get crammed into one big glob of text. That's
    > how it diplays on the public page. In MS access, how do I specify it
    > to recognize returns? As always. your help is appreciated!

    rob::db Guest

  3. #3

    Default Re: MS Access, Memo Return Breaks?

    Rob,

    Thanks for the post. I found the solution right here at Macromedia. Tech note
    [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16725[/url]. As I
    thought it's real simple:

    ASP with VBScript
    Find the Dreamweaver-generated code that displays the data field on the
    page:


    <%=(myRecordset.Fields.Item("myField").Value)%>

    Modify the code as specified below (code should be contained all on one
    line):


    <%=Replace(myRecordset.Fields.Item("myField").
    Value,Chr(13),"<br>")%>

    Thats it!

    trocat Guest

  4. #4

    Default Re: MS Access, Memo Return Breaks?

    Aye, as I said, it's just a built in function to replace line breaks (char
    13), with <br /> tags. One thing to note is that the tags there are just
    <br>, not <br />, which means they're not XHTML compatible.


    trocat wrote:
    > Rob,
    >
    > Thanks for the post. I found the solution right here at Macromedia.
    > Tech note
    > [url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16725[/url].
    > As I thought it's real simple:
    >
    > ASP with VBScript
    > Find the Dreamweaver-generated code that displays the data field
    > on the page:
    >
    >
    > <%=(myRecordset.Fields.Item("myField").Value)%>
    >
    > Modify the code as specified below (code should be contained all
    > on one line):
    >
    >
    > <%=Replace(myRecordset.Fields.Item("myField").
    > Value,Chr(13),"<br>")%>
    >
    > Thats it!

    rob::db Guest

Similar Threads

  1. Format Access memo field?
    By timsilva in forum Coldfusion Database Access
    Replies: 5
    Last Post: September 12th, 05:38 PM
  2. Memo Field with Access
    By jtoevs32 in forum Coldfusion - Getting Started
    Replies: 2
    Last Post: July 14th, 03:54 PM
  3. Submitted text cut off although Memo in MS Access
    By liglin1 in forum Macromedia ColdFusion
    Replies: 1
    Last Post: February 20th, 08:33 AM
  4. MS Access Memo Field and ASP
    By Jim Plante in forum ASP
    Replies: 2
    Last Post: August 6th, 08:18 PM
  5. Memo fields in MS Access
    By Franco Lombardo in forum IBM DB2
    Replies: 0
    Last Post: July 17th, 08:29 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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