[flexcoders] filterFunction - blows up when item field blank

2008-03-27 Thread Don Kerr
I've been using this code below for a long time...but don't fully understand how it works:) It does work great, as long as both title and docNumber are not null. But it blows up if docNumber is null. 1) Can someone explain in words what indexOf does? Obviously it compares the two and spits out a

Re: [flexcoders] filterFunction - blows up when item field blank

2008-03-27 Thread Scott Melby
1) Can someone explain in words what indexOf does? Obviously it compares the two and spits out a number, but I just don't fully grasp what is going on. Why use it instead of just == ? - String.indexOf returns -1 if the specified sequence is not found in the target string (the one you are