SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Paragraphs and CR

    I am pretty new at all of this but I have managed to create a interface (dreamweaver, vbscript, access) so that a few of my writers for the web site can log in and submit there text. The question is, how can they (or what do I have to do) place CR and Paragraphs in there content. It seems as thought the Access DB ignores any manual CR that is entered during input. (just like in this input box)

    I just pressed the ENTER key twice to get to hear but if I do that in my input box that does not happen.

    Also, is there any tutorials that could show me how to place buttons like the ones above this input box so they could put in images along with their text.

    Appreciate any help with this. Thanks.

  2. #2
    SitePoint Addict danfran's Avatar
    Join Date
    Jan 2005
    Location
    New York City
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All you have to do is replace the carriage returns with "<br>".

    Let's say you wanted to do this after having retrieved a paragraph from the Access database.

    Code:
    ' store the database field in a local variable, for example.
    sometext = rs("Paragraph1")
    
    ' replace the carriage returns
    sometext = replace(sometext,vbcrlf,"<br>")
    
    ' replace tabs with 4 space characters
    sometext = replace(sometext,vbTab,"&nbsp;&nbsp;&nbsp;&nbsp;")
    
    ' output the paragraph
    Response.Write sometext
    Alternatively, you could "function-ize" this..

    Dan

  3. #3
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, a bit overwelming for me at this point. I am not sure what any of that code is doing let alone where to place it in the code. Perhaps I am in a bit over my head.

    Do you know of any tutorials on this by chance?


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
  •