Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/01/2013, 05:07
Avatar de 60NZ4
60NZ4
 
Fecha de Ingreso: mayo-2012
Ubicación: 404 Not found
Mensajes: 112
Antigüedad: 12 años, 10 meses
Puntos: 2
Carrusel de videos

Buenas, queria hacer un carrusel de videos, en el que tengo un video en un iframe, y 5 imagenes pequeñas debajo de este video, lo que queria hacer es que al clicar en una imagen, se me cambiase el video por otro.

He hecho esto:

Código Javascript:
Ver original
  1. function cambiarVideo(video){
  2.            
  3.        
  4.         document.getElementById('CampoDestacado').src = video;
  5. }

Código HTML:
Ver original
  1. <iframe id="campoDestacado" name="campoDestacado" width="500px" height="300px"
  2.             src="http://www.youtube.com/watch?v=9bZkp7q19f0"
  3.             frameborder="0" allowfullscreen
  4.         style="margin-top:30px;margin-left:8px;z-index:1">
  5.     </iframe>
  6.        
  7.         <div style="height:10px;"></div>
  8.         <table style="width:60%">
  9.             <tr>
  10.                 <td style="width:60%"></td>
  11.                 <td style="width:40%">
  12.                     <img id="1" name="1" src="img/slideshow/cliente/1.jpg" title="" style="width:40px;height:40px;cursor:pointer;" onClick="cambiarVideo('http://www.youtube.com/watch?v=mh8MIp2FOhc')" ></img>
  13.                     <img id="2" name="2" src="img/slideshow/cliente/1.jpg" title="" style="width:40px;height:40px;"></img>
  14.                     <img id="3" name="3" src="img/slideshow/cliente/1.jpg" title="" style="width:40px;height:40px;"></img>
  15.                     <img id="4" name="4" src="img/slideshow/cliente/1.jpg" title="" style="width:40px;height:40px;"></img>
  16.                     <img id="5" name="5" src="img/slideshow/cliente/1.jpg" title="" style="width:40px;height:40px;"></img>
  17.                 </td>
  18.             </tr>
  19.         </table>

no se porque no funciona eso, imagino que habra algo mal expresado, espero que puedan ayudarme

un saludo y muchas gracias
__________________
Nadie nace aprendido, un experto es simplemente alguien que ya ha cometido muchos errores