Or an even simpler way to do it, considering you have an id:
Code:
var comm = document.getElementById("comment").value;
alert(comm);
Definitely does the trick. Of course, if you are using jQuery...
Code:
var comm = $('comment')
Would certainly return an object, considering what that does is... select element by name... at least from the looks of it, as opposed to getting the value of that element. All in all, if that's the only textarea in the document and you want to achieve the same result without getting by id...
Code:
var comm = document.getElementsByTagName("textarea");
var comm = comm[0].value;
alert(comm);
I'm sure there's at least a couple of other ways to do this thing, but eh... I'm not going to go through them all. Your original issue seems to come from a wrong reference to an object though. So if you don't want to use either of the shown results, look into that.