Ver Mensaje Individual
  #4 (permalink)  
Antiguo 21/02/2011, 10:12
Section1
 
Fecha de Ingreso: diciembre-2003
Mensajes: 173
Antigüedad: 20 años, 4 meses
Puntos: 1
Respuesta: Form dinamico con variables

Hola,

Bueno esta claro que me acerco pero no lo consigo del todo...

Dejo el codigo que he desarrollado siguiendo las indicaciones de Omar y haber si pudierai orientarme un poco mas..

Código HTML:
Ver original
  1. var url = 0;
  2. function asignarValor1 () {
  3. url = parseInt(document.form.select1.options[document.form1.select1.selectedIndex].value);
  4. }
  5. function asignarValor2 () {
  6. url += parseInt(document.form.select2.options[document.form1.select2.selectedIndex].value);
  7. document.form.enlace.href = "enlace.php?valor=" + url;
  8. }
  9.     </script>
  10. </head>
  11. <FORM method="post"  name="form1" action="calcular.php">
  12. <b>COCINA</b><br>
  13. <SELECT NAME="select1" onchange="asignarValor1 ()">
  14.    <OPTION VALUE="0">--Escoja--</OPTION>
  15.    <OPTION VALUE="1" >Pequeño 5-6,5 m2</OPTION>
  16.    <OPTION VALUE="2" >Medio 6,5-8 m2</OPTION>
  17.    <OPTION VALUE="3" >Grande 8-10 m2</OPTION>
  18. <br>
  19. <SELECT NAME="select2" onchange="asignarValor2 ()">
  20.    <OPTION VALUE="0">--Escoja--</OPTION>
  21.    <OPTION VALUE="1">Económico</OPTION>
  22.    <OPTION VALUE="2">Oferta</OPTION>
  23.    <OPTION VALUE="3">Luxe</OPTION>
  24. <br>
  25. <a href="" name="enlace"/>ver detalle calidad</a>
  26. </form>
  27. </body>
  28. </html>

Muchas gracias de nuevo.