I have an openlayers map which several POIS in it. Now i want, that the user can click on the POIS whichstarts an event where it posts the pointFeatures into Input Fields of the HTMLthe most of them work put, it seems that I cant't change the Select Input Fields.
here are my skripts which don't work.
// var selVo (should) be a Array with the Options of my select tag //(multiple strings) I thought that it would probably work if I // compare the Feature.vogel (String) with the ones in the select tag. var selVo = document.getElementById("vogel").options; for( var i = 0; i < selVo.length; i++){ if (options.value == feature.vogel){ document.getElementById("vogel").selectedIndex = i; break; } } // Brut is a number (actually a Boolean of mysql) and if it is 1 //I want the select tag to use the option 0 and 1 if it is not 1. if(feature.brut == 1){ document.getElementById("brut").selectedIndex = 0; document.getElementById("eier").value = feature.anzahleier; }else{ document.getElementById("brut").selectedIndex = 1; }I Hope you can understand what I am thinking of.
أكثر...
here are my skripts which don't work.
// var selVo (should) be a Array with the Options of my select tag //(multiple strings) I thought that it would probably work if I // compare the Feature.vogel (String) with the ones in the select tag. var selVo = document.getElementById("vogel").options; for( var i = 0; i < selVo.length; i++){ if (options.value == feature.vogel){ document.getElementById("vogel").selectedIndex = i; break; } } // Brut is a number (actually a Boolean of mysql) and if it is 1 //I want the select tag to use the option 0 and 1 if it is not 1. if(feature.brut == 1){ document.getElementById("brut").selectedIndex = 0; document.getElementById("eier").value = feature.anzahleier; }else{ document.getElementById("brut").selectedIndex = 1; }I Hope you can understand what I am thinking of.
أكثر...