Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

iniciante_ASP

Onchange

Recommended Posts

Amigos

 

No código abaixo gostaria que a cda seleção o combo seguinte fosse atualizado. Algu´me pode me ajudar? Agradeço desde já

<form name="busca_veiculos" method="post" action="resultado.asp" onSubmit="return validar(this)"><table width="150" border="0" cellspacing="0" cellpadding="0"><tr><td height="18" align="left" width="150" background="Imagens/Images/Fundo_barradir.jpg"><select name="categ" style="font-family: tahoma; font-size: 10; width: 138;height:138"><option selected>Escolha Estado</option><% While NOT rsEstado.EOF %><option value="<%=rsEstado("id")%>"><%=rsEstado("Estado")%></option><% rsTipos.Movenext : wend %></select></td></tr><tr><td height="18" align="left" width="150" background="Imagens/Images/Fundo_barradir.jpg"><select name="tipo" style="font-family: tahoma; font-size: 10; width: 138;height:138"><option selected>Escolha Cidade</option><% While NOT rsExpedientes.EOF %><option value="<%=rsExpedientes("Cidade")%>"><%=rsExpedientes("Cidade")%></option><% rsExpedientes.Movenext : wend %></select></td></tr><tr><td height="18" align="left" width="150" background="Imagens/Images/Fundo_barradir.jpg"><select name="marca" style="font-family: tahoma; font-size: 10; width: 102;height:102"><option selected>Escolha Veículo</option><% do while not f_marca.eof %><option value="<% = f_marca.fields("id")%>"><% = f_marca.fields("marca")%></option><% f_marca.movenextloop%></select><input type="submit" name="Submit2" value="OK"> <td></tr></table></form>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Fala, Rodrigão Coloquei em negrito. Eu gostaria de daca caixa de seleção atualizasse a próxima. por exemplo quando eu selecionar o estado de SP na próxima vai aprecer as cidades de SP.

 

 

<form name="busca_veiculos" method="post" action="resultado.asp" onSubmit="return validar(this)">

<table width="150" border="0" cellspacing="0" cellpadding="0">

<tr>

<td height="18" align="left" width="150" background="Imagens/Images/Fundo_barradir.jpg">

<select name="categ" style="font-family: tahoma; font-size: 10; width: 138;height:138">

<option selected>Escolha Estado</option>

<% While NOT rsEstado.EOF %>

<option value="<%=rsEstado("id")%>"><%=rsEstado("Estado")%></option>

<% rsTipos.Movenext : wend %>

</select></td></tr>

<tr>

<td height="18" align="left" width="150" background="Imagens/Images/Fundo_barradir.jpg">

<select name="tipo" style="font-family: tahoma; font-size: 10; width: 138;height:138">

<option selected>Escolha Cidade</option>

<% While NOT rsExpedientes.EOF %>

<option value="<%=rsExpedientes("Cidade")%>"><%=rsExpedientes("Cidade")%></option>

<% rsExpedientes.Movenext : wend %>

</select>

</td>

</tr>

<tr>

<td height="18" align="left" width="150" background="Imagens/Images/Fundo_barradir.jpg">

<select name="marca" style="font-family: tahoma; font-size: 10; width: 102;height:102">

<option selected>Escolha Veículo</option>

<% do while not f_marca.eof %>

<option value="<% = f_marca.fields("id")%>"><% = f_marca.fields("marca")%></option>

<%

f_marca.movenext

loop

%>

</select>

<input type="submit" name="Submit2" value="OK"> <td></tr>

</table>

</form>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Isso só é possível usando JavaScript. Dê uma pesquisada aqui mesmo no fórum por AJAX que terá um exemplo de como pode ser feito isso.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.