> $('#myTextarea').attr('val').indexOf('hello') != -1
>
> --Klaus

$('#myTextarea').val().indexOf('hello') != -1

works. Thanks! :)

Now, when I extend my code it doesn't work anymore.

                        if ($('#myTextarea').val().indexOf('hello') != -1)  {
                                        log.empty().html('test');
                                }
                                else if ($('#myTextarea').val().indexOf('moo') 
!= -1)  {
                                        log.empty().html('test2');
                                }


typing in 'moo' works, the log layer get's filled with 'test2'.
typing in 'moo hello' also works, the log layer get's filled with
'test'.
typing in 'moo hello moo' should produce 'test2' but it just does
nothing. :(


Reply via email to