idiot question...
Web Development
5
Posts
2
Posters
0
Views
1
Watching
-
-
-
try using dtext = text.replace("\r\n","\n"); or use dtext = text.replace(/\r|\n|\r\n/g, ""); I live to code.
i tried both and neither worked im basically throeing up a new window that is supposed to show an html preview of what is typed into a textarea ... when the user hits the enter key a \r\n sequence is generated (i thought) and i need to replace that with <br> for formatting purposes thnx for trying tho
-
try using dtext = text.replace("\r\n","\n"); or use dtext = text.replace(/\r|\n|\r\n/g, ""); I live to code.
-