Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 21st, 2004, 04:39 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
REPLACE function not doing its job

Any idea why the following code isn't working properly? I want it to replace carriage returns in a textarea part of a form with <br> so that I don't have to go into the database at the back end and add the html.

Function ChkString2(string2)
ChkString2 = Replace(string2, vbcrlf, "<br>")
End Function

Much appreciated

Steve

Reply With Quote
  #2  
Old July 21st, 2004, 05:44 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Hold fire on this. I missed something out. Be back later if it still doesn't work

Reply With Quote
  #3  
Old July 21st, 2004, 06:10 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Don't worry. I've sorted it now

Reply With Quote
  #4  
Old July 22nd, 2004, 10:04 AM
intrigue's Avatar
intrigue intrigue is offline
www.diebythesword.net
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: Leicester, UK
Posts: 202 intrigue User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 49 m 53 sec
Reputation Power: 5
Send a message via ICQ to intrigue Send a message via MSN to intrigue Send a message via Yahoo to intrigue
you sorted it by doing what?
always nice to see why someone had a problem just incase others have the same.

.matt
__________________
Has this been of help? If so click me scales icon at the top right of this post you know you want to.

Reply With Quote
  #5  
Old July 22nd, 2004, 10:55 AM
stevemw stevemw is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: uk
Posts: 70 stevemw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
I forgot to run the function against the form fields hehehe

'function to check for carriage returns
Function ChkString2(string2)
ChkString2 = Replace(string2, vbcrlf, "<br>")
End Function

' run replace function
field1 = ChkString2(Request.Form("field1"))
field2 = ChkString2(Request.Form("field2"))

..etc...

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > REPLACE function not doing its job


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway