I'm really a fan of the drop-down validation of the javascript. However, I'm kind of stuck around passing arguments with a dynamic km variable.. if anyone has experience with Javascript or passing km variables, could you help me understand why the first code works, but the second doesn't? Thank you guys so much
// Get the object to work with.
var objSelect = document.getElementById("web-selection_"+document.kmvar.vZEROIndex+"_");// Set the value of the object and activate the onchange() function.
setSelectedValue(objSelect, "ActualDropdownItem");function setSelectedValue(object, value) {
for (var i = 0; i < object.options.length; i++) {
if (object.options[i].text === value) {
object.options[i].selected = true;
// object.onchange();
return;
} } }
var vDropdownInput = document.kmvar.vDropdownInput;
// Get the object to work with.
var objSelect = document.getElementById("web-selection_"+document.kmvar.vZEROIndex+"_");// Set the value of the object and activate the onchange() function.
setSelectedValue(objSelect, vDropdownInput);function setSelectedValue(object, value) {
for (var i = 0; i < object.options.length; i++) {
if (object.options[i].text === value) {
object.options[i].selected = true;
// object.onchange();
return;
} } }