[Chameleon-dev] [Bug 965] WMSBrowser: bug in mySearch javascript function

bugzilla-daemon at maptools.org bugzilla-daemon at maptools.org
Thu Feb 17 04:44:58 EST 2005


http://www.maptools.org/bugzilla/show_bug.cgi?id=965





------- Additional Comments From bartvde at xs4all.nl  2005-02-17 04:44 -------
I suggest the following for the mySearch function instead of the current
implementation:

function mySearch( sr, value )
{
    var i;
    var result = null;

    if (sr.GetValue( "layer_id" ) == value)
    {
      result = sr;
    }
    else
    {
        if (sr.maoChildren.length > 0)
        {
            for (i=0; result == null && i < sr.maoChildren.length; i++)
            {
                result = mySearch( sr.maoChildren[i], value );
            }
        }
    }
    return result;
}



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.


More information about the Chameleon-dev mailing list