displaying object only if all dropdown selections are attributes

Discussion in 'JavaScript' started by Ivan D, Aug 1, 2010.

  1. #1
    Hello,

    I hope I'm posting to the right forum, it's a javascript question that I've encountered working with the Google maps API.

    I am trying to display my polygons only if the dropdown selections are both true. I can get everything to display independently (i.e. a selection from each dropdown will display only the objects whose attributes match the most recent selection) instead of those whose attributes match both dropdown selections.

    According to firebug, my issue is my second variable in the condition (in red) is undefined:

    function show(type, proponents) {
    for (var i=0; i<polys.length; i++) {
    if ((polys.mytype== type) && (polys.myproponents == proponents)) {
    polys.show();
    makeSidebar();

    yet I've set all its attributes in the same manner as "type" variable.

    Here's a link so I did not have to post whole code (scroll down for map): http://smbrc.e-ffectiveweb.com/

    Any and all tips, advice, and suggestions are appreciated.

    Thank you in advance
     
    Ivan D, Aug 1, 2010 IP