Código ASP:
Ver original
<form action="coplanrev.asp" method = "post" id="form1" name="buscar"> LINEA: <select name='seleccion' onchange ="document.getElementById('form1')"> <option></option> <option>WindPower</option> <option>Hydro</option> <option>CIM</option> </select> <input type="submit" name="buscar" value="Buscar"> <%Dim combo if request.Form("seleccion")<> "" then%> <%Dim valorcombo valorcombo = request.Form("seleccion") end if%> </form> <form action="coplanrev.asp" method = "post" id="form2" name="añadir"> <input type="text" name="elemento" size=20 value=""> <input type="submit" name="agregar" value="Agregar"> <%if request.Form("elemento")="" then%> <%else%> <%Dim valortext valortext = request.Form("elemento")%> <%tablabase.open "select count(n_pedido) as n_pedido from tablabase where n_pedido ='"&valortext&"'", conn%> <%while not (tablabase.eof)%> <%Dim existe Session(tablabase("n_pedido")) = tablabase("n_pedido").value existe = tablabase("n_pedido")%> <%tablabase.moveNext%> <%wend%> <%tablabase.Close%> <%if existe = "1" then%> [B]COGER VALOR SELECCIONADO DEL COMBO[/B] <%if combo<> "" then%> <%tablabase.open "update tablabase set preaprobacion='1', preaprobacionl='"&combo&"' where n_pedido ='"&valortext&"'", conn%> <%response.redirect "coplanrev.asp"%> <%else response.write "<br> * Elige la linea"%> <%end if%> <%else%> <%if valorcombo <> "" then%> <%="<BR> * El pedido no existe"%> <%else response.write "<br> * Elige la linea e introduce el pedido correcto"%> <%end if%> <%end if%> <%end if%> </form>
Lo que quiero es que en el cacho de código que he introducido, donde he escrito en mayúscula, me coja el valor que elijo del combo del form1 para hacer comprobaciones y coger el valor.
Como puedo hacerlo?

