Ver Mensaje Individual
  #4 (permalink)  
Antiguo 29/10/2010, 13:17
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: problemas con el select

En realidad no entiendo que quieres hacer, pero pruenba con este código de ejemplo, para que veas cual es el valor que se recupera de cada option, al cambiar el indice del select

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" >
  4. <title>XHTML 1.0 Strict</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <script type="text/javascript">
  7. //<![CDATA[
  8. function mostrarIndice(){
  9. var selObj = document.getElementById('grupo');
  10. var selIndex = selObj.selectedIndex;
  11. var txtValue = selObj.options[selIndex].value;
  12. alert (txtValue);
  13. }
  14. //]]>
  15. </head>
  16. <div class="clasica"><b>Grupo</b>
  17. <br />
  18. <select style="width:100%;" id='grupo' name='grupo' onchange="mostrarIndice();">
  19. <option value="">Seleccionar</option>
  20. <option value="&lt;1000&gt;=500">&lt;1000&gt;=500</option>
  21. <option value="dos">dos dos dos </option>
  22. <option value="tres">tres tres tres </option>
  23. </div>
  24. <!-- ©2000 Emprear.com -->
  25. </body>
  26. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.