You can use the val() function:

    $('#inputbox').val( json['results'] );

http://docs.jquery.com/Attributes/val

There's probably a minor slow down since it's using a function rather
than direct assignment.

Karl Rudd

On Wed, Apr 16, 2008 at 3:34 AM, s.ross <[EMAIL PROTECTED]> wrote:
>
>  I'm a tentative "switcher" from Prototype. Not sure yet... I'm porting
>  one app to see how it suits me. One of the frequent things this app
>  does is work with text in a textarea. Let's say the id of the textarea
>  is "inputbox" ... I find myself writing code like:
>
>  $('#inputbox')[0].value = json['results'];
>
>  I understand why this works and the Prototype'ish version $
>  ('inputbox').value = 'foo' doesn't. I'm just wondering whether there
>  is a different, more idiomatic way.
>
>  Thx
>

Reply via email to