Update textarea with jquery

Posted by bocca on Stack Overflow See other posts from Stack Overflow or by bocca
Published on 2010-01-13T12:48:22Z Indexed on 2010/04/16 17:03 UTC
Read the original article Hit count: 203

Filed under:

Trying to get current data from textarea with jquery and replace it with what server returns. so far q value is picked up right, intead of updating it with server returned content, it just replaces it with ' '

q = $('textarea#id_message').val();
alert(q)
$("textarea#id_message").val(' ').load( '/process/url?html=' + q );

Update

just tried it passing server data to test results div, this does work, textarea does not

$( '#results' ).html( ' ' ).load( '/process/url?html=' + q );

© Stack Overflow or respective owner

Related posts about jQuery