All Downloads are FREE. Search and download functionalities are using the official Maven repository.

js.selectComboboxValueByText.js Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
var select = arguments[0];
for(var i = 0; i < select.options.length; i++) {
    if(select.options[i].text == arguments[1]) {
        select.options[i].selected = true;
    }
}
if ("createEvent" in document) {
    var evt = document.createEvent("HTMLEvents");
    evt.initEvent("change", false, true);
    arguments[0].dispatchEvent(evt);
} else {
    arguments[0].fireEvent("onchange");
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy