Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/05/2013, 18:26
Avatar de Joch_pa
Joch_pa
 
Fecha de Ingreso: octubre-2009
Ubicación: Pachuca De Soto, Hidalgo, Mexico, Mexico
Mensajes: 122
Antigüedad: 14 años, 6 meses
Puntos: 7
Respuesta: formulario "select" se resetea al utilizar una funcion.

a ver si entiendes lo siguiente:

Código ASP:
Ver original
  1. <%
  2. select1= request.form("select1")
  3. select2= request.form("select2")
  4. %>
  5.  
  6. <script language="javascript">
  7. function pasadatos()
  8. {
  9.    document.forms[0].submit();
  10. }
  11. </script>
  12.  
  13. <form method="post" action="estamismapagina.asp">
  14.  
  15.       <select name="select1" id="select1" style="FONT-SIZE: 10px; WIDTH: 110px; FONT-FAMILY: Arial; COLOR: #000033" onChange="pasadatos()">
  16.              <option value="0"  <%=if select1="0" then response.write("selected")%>  >Seleccione</option>
  17.              <option value="10" <%=if select1="10" then response.write("selected")%>>10</option>
  18.        </select>
  19.  
  20. <select name="select2" id="select2" style="FONT-SIZE: 10px; WIDTH: 110px; FONT-FAMILY: Arial; COLOR: #000033" onChange="pasadatos()">
  21.              <option value="0" <%=if select2="0" then response.write("selected")%>>Seleccione</option>
  22.              <option value="100000" <%=if select2="100000" then response.write("selected")%> >100000</option>
  23.        </select>
  24.  
  25. </form>