Using val() won't change the generated source.  It only changes the
current value in the input element.  For example, if you type a letter
in the textarea it doesn't change the generated html even though the
textarea value has changed.  So since your form is hidden maybe it is
changing and you can't see it but are rather checking the generated
source instead which isn't supposed to change.

Try out this example:

http://www.exfer.net/test/jquery/textarea_append_test.html

David

On Dec 4, 8:02 am, cfdvlpr <[EMAIL PROTECTED]> wrote:
> OK, I tried $("#utmtrans").val($("#utmtrans").val() + 'test');
>
> Here's the HTML before this gets called:
>
>         <form style="display:none;" name="utmform">
>                 <textarea id="utmtrans" name="utmtrans" >
>                 </textarea>
>         </form>
>
> And here's what I see when I "view generated source" with the firefox
> add on web developer toolbar.:
>
> <form style="display: none;" name="utmform">
>
>                 <textarea id="utmtrans" name="utmtrans">              
> </textarea>
>         </form>
>
> test, does not get appended there.  I actually don't need to append
> the text, but I need to simply add it.  .html() didn't seem to work.
> Anything else I can try?
>
> On Dec 3, 9:11 pm, David Serduke <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'd try
>
> > $("textarea").val($("textarea").val() + txt);
>
> > David
>
> > On Dec 3, 4:27 pm, cfdvlpr <[EMAIL PROTECTED]> wrote:
>
> > > append() doesn't seem to work.   I also tried this function that was
> > > mentioned in another thread here by John and that doesn't seem to work
> > > for me either.  Anyone else got this to work?  What might I be
> > > missing?
>
> > > $.fn.appendVal = function(txt) {
> > >     return this.each(function(){
> > >         this.value += txt;
> > >     });
>
> > > };- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Reply via email to