Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 How to recognize carriage returns
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Astralis
Senior Member

USA
1218 Posts

Posted - 03 December 2003 :  15:48:40  Show Profile  Send Astralis a Yahoo! Message
What code could I put in an include file to recognize carriage returns (BR) from a field in the database?

Edited by - Astralis on 03 December 2003 16:12:40

AWD_ENVY
Junior Member

103 Posts

Posted - 03 December 2003 :  16:13:51  Show Profile
This will put a <br> at carriage returns.

Replace(THE_FIELD_FROM_DATABASE,chr(13) & chr(10), "<br>")
Go to Top of Page

Astralis
Senior Member

USA
1218 Posts

Posted - 03 December 2003 :  16:22:49  Show Profile  Send Astralis a Yahoo! Message
Will that work in an include file?

I'm getting this error:

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'Replace'
Go to Top of Page

Doug G
Support Moderator

USA
6493 Posts

Posted - 03 December 2003 :  16:26:59  Show Profile
myStr = replace(theStr, vbcrlf, "<br />" & vbcrlf)

======
Doug G
======
Computer history and help at www.dougscode.com
Go to Top of Page

AWD_ENVY
Junior Member

103 Posts

Posted - 03 December 2003 :  16:45:34  Show Profile
quote:
Originally posted by Astralis

Will that work in an include file?

I'm getting this error:

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'Replace'



It works, but you need to makesure that the field you are replacing with does not conatin "Nulls" or Empty values.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07