Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/02/2011, 14:27
Shalvaid
 
Fecha de Ingreso: febrero-2011
Mensajes: 13
Antigüedad: 13 años, 2 meses
Puntos: 0
Tomar el Value de un Select tipo LIST

Hola, vengo ya hace un buen rato buscando como hacer esto y he probado de varias maneras y de ninguna me funciona... Lo que quiero hacer es que al hacer click en un div, llame a una funcion (Reload) y que lleve a una pagina mandando valores por metodo get.

Esta es mi funcion Reload

Código Javascript:
Ver original
  1. function Reload(){
  2.         var Produc = document.getElementById('Prod');
  3.         var Cate = document.getElementById('Cat');
  4.        
  5.         if (Produc.options[Produc.selectedIndex].value == "Uno" | Produc.options[Produc.selectedIndex].value == "Dos" | Produc.options[Produc.selectedIndex].value == "Tres") {
  6.             if (Cate .options[Cate .selectedIndex].value > 0 & Cate .options[Cate .selectedIndex].value <= 5) {
  7.                 window.location = "productos.php?produc="+Produc+"&categ="+Cate;
  8.             }
  9.         }
  10.     }

Eso lo que haria seria extraer el valor verdad?, porque no me funciona :S.
Asi tengo mis 2 select

Código HTML:
Ver original
  1. <select name="Prod" size="1" class="list_current" tabindex="1" id="Prod">
  2. <select name="Cat" size="1" class="list_current" tabindex="2" id="Cat">

Y sus opciones asi (las cargo desde php)

Código PHP:
Ver original
  1. echo "<option value='Uno'>Producto 1</option>";

Muchas gracias !