Ver Mensaje Individual
  #7 (permalink)  
Antiguo 22/02/2011, 10:17
omarMusic
 
Fecha de Ingreso: febrero-2011
Ubicación: Evolandia
Mensajes: 103
Antigüedad: 13 años, 2 meses
Puntos: 10
Respuesta: Form dinamico con variables

Bueno acá algunas correcciones:

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

bueno agregando algo mas si vas a utilizar xhtml escribe todos los tags en minúsculas, si es solo html la verdad no importa.

Saludos!