View Full Version : nl2br equivalent?
AName
10-24-2005, 11:32 AM
Is there a JScript equivalent to the php nl2br function? I'm looking for a way to change new lines in a textarea to <br />'s and remove any blank space.
darktown
10-24-2005, 01:32 PM
Isn't there a 'replace' - function to replace \n to <br/> ?
Or you could write an own function that does all sorts of replacements.
nl2br is just a function that does that i think.
DarkStreetDev
11-09-2005, 01:13 PM
ASP-VBSCRIPT
strString = Replace(strString, vbcrlf, "<br/>")
ASP-JAVASCRIPT
strString = strString.replace(/\n/, "<br/>");
AName
11-09-2005, 09:51 PM
Cool, thanks
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.