jason_kelly
03-09-2012, 01:47 PM
Hello,
I need your help.
For one reason or another, I have a textarea with text in it, however, when I call it back and store it in var, it seems to strip all the spaces.
[ID = "COMMENTS"]
Ie. of what's in the textarea:
----------------------------------------------
Apples are red
Oranges are orange
Pears are green
Bananas are yellow
var comments = document.getElementById("comments").value
returns:
Apples are red Oranges are orange Pears are green Bananas are yellow
How could this be re-written such that the spaces in between the text aren't ignored?
Much thanks and appreciation for everyones help.
Cheers
J
I need your help.
For one reason or another, I have a textarea with text in it, however, when I call it back and store it in var, it seems to strip all the spaces.
[ID = "COMMENTS"]
Ie. of what's in the textarea:
----------------------------------------------
Apples are red
Oranges are orange
Pears are green
Bananas are yellow
var comments = document.getElementById("comments").value
returns:
Apples are red Oranges are orange Pears are green Bananas are yellow
How could this be re-written such that the spaces in between the text aren't ignored?
Much thanks and appreciation for everyones help.
Cheers
J