• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

[JQUERY] Appending text to the end of my textarea

Question

Trix.Neo    1

Hi Folks,

I'm currently using this function below to add my text to the textarea called tagsText.

function addTag(thisText, thisValue, thisType){
$('#tagsText').val('['+thisType+','+thisText+','+thisValue+']');
}

What do I have to do to make it append the data rather than replacing it?

TIA

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
FlibbyFlobby    0

This should work:

$('#tagsText').append('The text you want to append');

Share this post


Link to post
Share on other sites
  • 0
Trix.Neo    1

Thats great thanks alot, now that I look at it that might be a bit obvious but as I wasn't sure what I was looking for it just goes to show I was right to ask. :D

Edited by Trix.Neo

Share this post


Link to post
Share on other sites
  • 0
Rob    20

Keep up with jQuery. I really like the library and its structure, now that I'm literally spending 5 hours a day coding with it at work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.