Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.
function ShowAssociatedSchemes(principalMembers, schemesClientId) {
var schemes;
var value, locations, searchLocation
if (principalMembers == null)
{
alert("Principal members drop down is null");
return;
}
schemes = document.getElementById(schemesClientId);
if(schemes == null)
{
alert("Schemes drop down is null");
return;
}
for (var i = 0; i < schemes.options.length; i++) {
if (principalMembers.value == "" || schemes.options[i].value == "") {
alert("making option visible");
schemes.options[i].style = "inline";
}
else {
value = schemes.options[i].value;
locations = value.substring(21)
searchLocation = principalMembers.value.substring(0, 6);
if (locations.indexOf(searchLocation) != -1) {
alert("making option visible");
schemes.options[i].style.display = "inline";
}
else {
alert("making option invisible");
schemes.options[i].style.display = "none";
}
}
}
}
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Join the community of 500,000 technology professionals and ask your questions.