| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Hold fire on this. I missed something out. Be back later if it still doesn't work
|
|
#3
|
|||
|
|||
|
Don't worry. I've sorted it now
|
|
#4
|
||||
|
||||
|
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. |
|
#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... |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > REPLACE function not doing its job |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|