0

I have a problem with append() working in IE but not in FF. I append text to a content in text area. if I load textarea with text and then delete a few chars, and then try to append -- it does not work. Is there an alternative to it?

7
  • 2
    How is it that you have asked 74 questions, and still don't know that with no code, you might as well not ask at all? Commented Mar 4, 2011 at 14:36
  • You are probably doing something wrong.... though my powers are not string (strong :P :D) enough to predict what. Could you post your code to make it easier for us? Commented Mar 4, 2011 at 14:37
  • @Felix, "my powers are not string enough", nice unintentional pun :) Commented Mar 4, 2011 at 14:38
  • I think its awesome I wouldn't correct it. Commented Mar 4, 2011 at 14:40
  • @davin: That could be a nice programmer slogan: Are you really string enough to do...? or How string are you? Commented Mar 4, 2011 at 14:40

1 Answer 1

5

If you're working with a textarea, you should be using .val() to set its value instead of .append().

$('textarea').val( function( i, val ) { return val + "new text"; } );
Sign up to request clarification or add additional context in comments.

3 Comments

@ElGuapo: Patrick is one of our Masters. It is difficult to trick him. May the Force be with you both!
Normally I post the code. In this case I checked my code many times and was looking for an insight of this caliber. The problem is not my code but the wrong choice of code for TEXTAREA. Thanks @patrick dw!
@Felix, @ElGuapo: You're far too kind. :o)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.