<textarea id="metaSourceText" name='key' style="width:100%" class="text ui-widget-content ui-corner-all" rows="1"></textarea>
I tried
$metaSourceValue = $('metaSourceText').val();
alert($metaSourceValue);
But it shows "undefined"
<textarea id="metaSourceText" name='key' style="width:100%" class="text ui-widget-content ui-corner-all" rows="1"></textarea>
I tried
$metaSourceValue = $('metaSourceText').val();
alert($metaSourceValue);
But it shows "undefined"
 
    
     
    
    Your code just needs to be tweaked, to something like this:
var metaSourceValue = $('#metaSourceText').val();
alert(metaSourceValue);
you were missing the hash before metaSourceText, signaling an ID to jQuery. And you typically don't want to start variables with $
 
    
    Please define the selector with '#' prefix as it is an ID you are referring. In your case, it refers a DOM element of type metaSourceText which really does not exists..
To get a value of this text area: you can use .text() or val();
$(function(){
var textareaContent = $('#metaSourceText').text();
alert(textareaContent);
});
fiddle link:http://jsfiddle.net/Ds4HC/1/
 
    
    .text() method will also give you value of textarea. In ready() state you can either get object of textarea using class selector or id selector.
 $(document).ready(function () {
 $("#submitbtn").click(function () {
 var textAreaValue = $("#txtMessage").text();
 alert(textAreaValue);
 });
});
Check sample here: http://www.codegateway.com/2012/03/get-textarea-value-in-jquery.html
 
    
    Javascript variables don't start with $.  EDIT: They can, but usually do not.  See 
Why would a JavaScript variable start with a dollar sign?)
You want to try:
var metaSourceValue = $('#metaSourceText').val();
alert(metaSourceValue);
The $(...) used by jQuery is a shortcut to the jQuery function.
Also, as others mentioned, you need $('#metaSourceText') if you're trying to reference the textarea by id - you were missing the #.
 
    
    