On May 11, 5:46 pm, Bil Corry <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote on 5/11/2007 9:34 AM: > > > I am trying to get the value of a textarea with the following code, > > however it is returning null all the time. > > > var curText= $("[EMAIL PROTECTED]").val(); > > This works: > > var curText= $("#myText").val(); > > - Bil
The "#myText" way is quicker as well. The reason "[EMAIL PROTECTED]" was not working was because it is a <textarea> rather than an <input> ( "[EMAIL PROTECTED]" would have worked, but # is still a better way).