| Posted: 05/24/2006, 7:36 AM |
|
I have a page with search and grid. On the onload event of the page I have this in order to disable the dependent listbox:
var sel_index = document.t_asuntoSearch.s_id_sector.options[document.t_asuntoSearch.s_id_sector.selectedIndex].value;
if (sel_index == "") {
//Clear child listbox
for(var i=document.t_asuntoSearch.s_id_empresa.length;i>0;i--) {
document.t_asuntoSearch.s_id_empresa.options = null;
}
document.t_asuntoSearch.s_id_empresa.options[0] = new Option("Seleccionar un Sector","");
document.t_asuntoSearch.s_id_empresa.disabled = true;
}
it worked great until I added a BeforBuildSelect on the dependent listbox.. anybody know why?
The beforebuildselect code:
Select Case Session("Area")
Case 7
t_asuntoSearch.s_id_empresa.DataSource.Where = " id_sector = 2"
Case 11
t_asuntoSearch.s_id_empresa.DataSource.Where = " id_empresa = 6 or id_empresa = 4 or id_empresa = 11 or id_empresa = 5"
Case Else
t_asuntoSearch.s_id_empresa.DataSource.Where
End Select
_________________
bedollandres |