G
Guest
I have three dropdownlists in an AJAX UpdatePanel and I need to return the
selected index for two of them; the problem is that I'm only able to return
the selected index for the first dropdownlist of the three and it is the one
that I don't need. The dropdownlists are named, in order, ddlEntityType,
ddlEntityGroups and ddlProcesses. The Javascript for attempting to read the
selected index is as follows:
var entityTypeIndex =
document.getElementById('ct100$ContentPlaceHolder1$ddlEntityType').selectedIndex; // this one works
var entityGroupIndex =
document.getElementById('ct100$ContentPlaceHolder1$ddlEntityGroups').selectedIndex; // this doesn't work
var processesIndex =
document.getElementById('ct100$ContentPlaceHolder1$ddlProcesses').selectedIndex; // this doesn't work
Trying all three in the Immediate Window, the first one still works; the
message I get back for the other two is: Object required
Why won't it find the dropdownlists for the two that I need to return the
SelectedIndex from?
selected index for two of them; the problem is that I'm only able to return
the selected index for the first dropdownlist of the three and it is the one
that I don't need. The dropdownlists are named, in order, ddlEntityType,
ddlEntityGroups and ddlProcesses. The Javascript for attempting to read the
selected index is as follows:
var entityTypeIndex =
document.getElementById('ct100$ContentPlaceHolder1$ddlEntityType').selectedIndex; // this one works
var entityGroupIndex =
document.getElementById('ct100$ContentPlaceHolder1$ddlEntityGroups').selectedIndex; // this doesn't work
var processesIndex =
document.getElementById('ct100$ContentPlaceHolder1$ddlProcesses').selectedIndex; // this doesn't work
Trying all three in the Immediate Window, the first one still works; the
message I get back for the other two is: Object required
Why won't it find the dropdownlists for the two that I need to return the
SelectedIndex from?