Usar onChange em tag
Estou tentando usar o resultado do primeiro combobox para fazer a consulta da segunda combobox.
Alguem pode me ajudar sou novato.
<form name="frmConsulta" action="Admin_Boletim.asp" method="post">
<select name="cboSetor" class="Arial9_CZE" onChange="document.getElementById('frmConsulta').submit()">
<option value="" selected>-escolha-</option>
<%
varSQL="SELECT * FROM tb_Boletim_Setor ORDER BY Setor"
Set rsC = Server.CreateObject("ADODB.Recordset")
rsC.open varSQL,varConINFO,3,1
If NOT rsC.EOF OR NOT rsC.BOF Then
do while not rsc.eof
%>
<option value="<%=rsC.Fields.Item("NumSetor").Value%>"<% if CLng(varNumSetor_C)=CLng(rsC.Fields.Item("NumSetor").Value) then %> selected<% end if %>><%=rsC.Fields.Item("Setor").Value%></option>
<%
rsc.movenext
loop
end if
rsc.close
set rsc=nothing
varSQL=""
%>
</select></td>
</tr>
<tr bgcolor="#F5F8FF">
<td><img src="../Imagens/Blank.GIF" width="10" height="5"></td>
<td class="Arial9_CZE_B" align="right">Assunto: </td>
<td colspan="2"><select name="cboAssunto" class="Arial9_CZE">
<option value="" selected>-escolha-</option>
<%
varSQL="SELECT * " &_
"FROM tb_Boletim_Assunto " &_
"WHERE (NumSetor = "& request.form("cboSetor") &") " &_
"ORDER BY Assunto "
Set rsC = Server.CreateObject("ADODB.Recordset")
rsC.open varSQL,varConINFO,3,1
If NOT rsC.EOF OR NOT rsC.BOF Then
do while not rsc.eof
%>
<option value="<%=rsC.Fields.Item("NumAss").Value%>"<% if CLng(varNumAss_C)=CLng(rsC.Fields.Item("NumAss").Value) then %> selected<% end if %>><%=rsC.Fields.Item("Assunto").Value%></option>
<%
rsc.movenext
loop
end if
rsc.close
set rsc=nothing
varSQL=""
%>
</select>Discussão (1)
Carregando comentários...