Archived

This topic is now archived and is closed to further replies.

[java] JavaScript; How would I do this? (simple question)

This topic is 5008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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>

Share this post


Link to post
Share on other sites

This topic is 5008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.