Select to view content in your preferred language

dom.byId won't parse

1836
12
Jump to solution
05-15-2014 10:47 AM
williamcarr
Frequent Contributor
Greetings,

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.

Anyone know what might be causing this?
0 Kudos
12 Replies
JeffPace
MVP Alum
I added it.  See my post #9.  I think that has it working
0 Kudos
williamcarr
Frequent Contributor
Pow! 4 gold stars, Jeff!

Also, I removed the ready and it work all the same. Really appreciate your help.
0 Kudos
JeffPace
MVP Alum
happy to help
0 Kudos