addBr
This code takes input from a textarea and replaces carriage returns with the HTML line break BR...
Original Author: Robert Somers
Inputs
This code accepts a text string.
Assumptions
You need to take a string variable Ex. myString and set it equal to addBr( myString ). Ex. myString = addBr( myString ) and ta da well formatted HTML text!
Returns
This code returns the initial string with the chr(10) relpaced by
. It is really handy to keep the formatting the user enters.
Side Affects
Switches chr(10) with
for HTML formatting.
API Declarations
Please rank my code! And vote for me!
Code
<%
FUNCTION addBr( myString )
addBr = Replace(myString, CHR(10), "
")
END FUNCTION
%>
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.