What is the proper way to extract the value of a textarea in a form via javascript?
var subject = $("input#subject").val();
if (subject == "") {
$("label#subject_error").show();
$("input#subject").focus();
return false;
}
var description = $("textarea#description").val();
if (description == "") {
$("label#description_error").show();
$("Textarea#description").focus();
return false;
}
The $("input#subject").val()
works fine but not the $("textarea#description").val()
. Must be a noob error I'm missing.
Thank you!