I have the following javascript function:
function tipodepsolicitante_event() {
var e = document.getElementById("ContentPlaceHolder1_cbotipodepositantes");
var d = e.options[e.selectedIndex].value;
if (d == "ER") {
document.getElementById('<%= cbotipodocumentosolicitante.ClientID %>').selectedindex = 1;
document.getElementById('<%= cbotipodocumentosolicitante.ClientID %>').disabled = true;
document.getElementById('<%= cbopaisresidenciasolicitante.ClientID %>').disabled = true;
} else {
document.getElementById('<%= cbotipodocumentosolicitante.ClientID %>').disabled = false;
document.getElementById('<%= cbopaisresidenciasolicitante.ClientID %>').disabled = false;
}
}
This is executed in the event: onchange
of other dropdownlist
, this works if the controls are disabled when executing the function: cbotipodocumentosolicitante
and cbopaisresidenciasolicitante
, but the .selectedindex
in the first line does not work
I have tried many functions to set up data that I found on the internet but nothing works.
What am I doing wrong?