I assume that this is a parsing issue, but I can't be for the life of me figure how.
var option= dom.byId("selectfield"); var optionValue = option.options[option.selectedIndex].value; console.log(optionValue); if (optionValue == "ON"){map.centerAndZoom(pt, 12);} else {} }
This is the section that is causing me grief. When I remove parser.parse(); the function runs fine. The problem is all of my title panes and content panes get thrown totally out of whack. Without it I'm getting " option.selectedIndex is undefined".
I'm using this a dropdown to toggle the center and zoom of a watch ID.