Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/05/2010, 01:06
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 17 años
Puntos: 574
Respuesta: Porfavor, necesito vuestra ayuda con esta tontería

Código HTML:
Ver original
  1. <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  2. </head>
  3.  
  4. function Combos(x)
  5. {
  6. ItDepend1=document.getElementById('diaHora');
  7. if(!ItDepend1){return;}
  8. if(x.value == "Tardor"){
  9.     ItDepend1.innerHTML='DIA 1 - 09:00';
  10. }else if(x.value == "Primavera"){
  11.     ItDepend1.innerHTML='DIA 3 - 09:00';
  12. }else{
  13.     ItDepend1.innerHTML="";
  14. }
  15.  
  16.  
  17. }
  18.  
  19. <h2>Datos</h2>
  20. <tr>
  21. <td><select name="or1" id="or1" onChange="Combos(this)">
  22. <option value="Triar">Selecciona</option>
  23. <option value="Tardor">Dilluns</option>
  24. <option value="Primavera">Divendres</option></select></td></tr><tr>
  25. <td><label>Curso</label></td>
  26.  
  27. </tr>
  28. <tr>
  29. <td id="diaHora">&nbsp;</td>
  30. <td><select name="dia11gr1" id="modalitat" tabindex="11">
  31. <option value="pref1" >preferencia 1</option>
  32. <option value="pref2" >preferencia 2</option>
  33. <option value="pref3" >preferencia 3</option>
  34. <option value="pref4" >preferencia 4</option>
  35. <option value="nopref" >No puedo</option>
  36. </select></td>
  37.  
  38. </tr>
  39.  
  40.  
  41. </form>
  42.  
  43. </body>
  44. </html>

Mucho mas simple.... no?

Quim