View Single Post
Old 10-31-2012, 07:56 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,185
Thanks: 59
Thanked 3,995 Times in 3,964 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
In this code that I gave you:
Code:
        // for first version above, array of arrays:
        if ( listEntry[0].search(re) != -1)
        {
            selectObj[numShown++] = new Option( listEntry[0], listEntry[1] );
        }

        // for second version above, array of objects:
        if ( listEntry.name.search(re) != -1)
        {
            selectObj[numShown++] = new Option(listEntry.name, listEntry.url );
        }
you were supposed to use *EITHER* the red code *OR* the magenta code.

It will *NEVER* work if you try to use *BOTH*.

Go back and read my message on this again.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote