Hello java aficionados! I have a small questions for you.
I appoligize in advance if this JavaScript questions doesnt no fit into the "Java" forum.
I have textarea tag pair, and it has text in betwene. What I want to do is 1) check to see if it has text that is _NOT_ all spaces and then 2) if it does have spaces " " then to remove them. If it alreay has text other then spaces like " foo " then I want to trim the spaces off and just leave "foo".
I do not know a single bit of javascript, so I would like for someone to just give me a code snipet of how to do this.
This is my code to work with:
<textarea name="comment" cols="30" rows="6" id="comment">
(spaces, spaces, spaces) </textarea>
This sounds too much like a homework question to be allowed. Learn some JavaScript and try it out, then if you still need help you can post again with what you have.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform.
You can accept analytics or continue with necessary cookies only.
Learn more