Using jquery I'm trying to post textarea content back to a php backend. I can successfully alert out the textarea content, however when I use the $.post, firebug shows it as 'undefined'.
The post will successfully send the borrowing id. I have also tried giving the textarea a unique id but to no avail.
alert($('textarea').val());
$.post("modules/readers/readers.php",
{ task: "return_reader",
borrowing_id: $('#borrowing_id').val(),
comment: $('textarea').val() },
function(data){
//etc
}
);