The reason I am using the other is because of asp.net. When it renders
it changes the id of the tag, so all I know is that snippet.

On May 11, 12:51 pm, Sam Collett <[EMAIL PROTECTED]> wrote:
> 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).

Reply via email to