|
-
May 12th, 2001, 10:24 PM
#1
Thread Starter
Good Ol' Platypus
CrLf processed in Response.Write and MEMO fields
I've got a Q.
I have a MEMO field in an ACCESS database. I have a textarea that's contents are written to the field. That part is okay.
But then, when I am showing this memo field (response.write), will line returns in the textarea be written as nothing or line returns?
And if the above's answer is yes, when response.written, will they display correctly?
(I am writing a forum)
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 13th, 2001, 04:58 AM
#2
Hyperactive Member
CrLf's will be processed as CrLf... so if you want to show them as a CrLf on a html page, you need to replace them with the <br> tag.
-
May 13th, 2001, 10:53 AM
#3
Thread Starter
Good Ol' Platypus
Sounds good... then I guess my next Q would be, how would I kill all of the CrLfs in a string and turn them into <BR>s?
Is InStr present in VBScript?
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 13th, 2001, 12:40 PM
#4
Guru
You can use the VBScript Replace function
Example:
Code:
Response.Write Replace(rs("MyMemoField"), vbCrLf, "<br>")
An alternative to this is to use the <PRE> tags, these preserve formatting (like line breaks) so you don't have to modify the text at all
Example:
Code:
<pre>
Hello
World
</pre>
this will preserve the line breaks
Tom
-
May 13th, 2001, 04:46 PM
#5
Thread Starter
Good Ol' Platypus
Sweet! Erm... I mean, I'm more civilized than that!...
I guess...
Thanks for helping me out!
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 13th, 2001, 06:55 PM
#6
Thread Starter
Good Ol' Platypus
And if it's okay w/VB-World i'm gunna use their smileys
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 13th, 2001, 07:35 PM
#7
Thread Starter
Good Ol' Platypus
Okay, I've got another question for you guys.
I want to parse all web addresses in to anchor tags. If possible I would also like to find out the title of that page, so I can put it into the <A></A> tags. I know the second part probably can't be done, but what about the first part?
EG. VB-World parses HTTP strings:
http://www.vb-world.net/
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
May 14th, 2001, 11:36 PM
#8
Guru
Use the RegExp object of VB Script 5.5. I have created a regular expression that does the parsing and turns it into a URL. If you need the code let me know
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|