Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/01/2012, 22:32
Avatar de besotico
besotico
 
Fecha de Ingreso: junio-2008
Ubicación: Iquique, Chile, Chile
Mensajes: 70
Antigüedad: 15 años, 11 meses
Puntos: 0
Pregunta fancybox mas js?

Hola amigos, tengo un script en js, que me funciona muy bien por si solo, pueden verlo funcionando aquí http://tinyurl.com/6w6gnj6

el codigo es
Código Javascript:
Ver original
  1. <script type="text/javascript">
  2. //<![CDATA[
  3. *
  4.  function testchk(){
  5. var valor = document.getElementById('chk_id').checked;
  6. alert(valor);
  7. }
  8.  
  9.  
  10.  
  11.  
  12. function check(funcion,modulo,checkboxid,imag) { *
  13. var valor = document.getElementById(checkboxid).checked;
  14.  
  15.  
  16.  
  17. if(funcion == "over"){
  18.     if(valor ==false) {
  19.        
  20.         document.getElementById(imag).src = "images/modulo" + modulo + "2" + "_" + checkboxid + ".jpg";
  21.  
  22.     }
  23. }
  24.  
  25. if(funcion == "out"){
  26.     if(valor ==false) {
  27.         document.getElementById(imag).src = "images/modulo" + modulo + "_" + checkboxid + ".jpg";
  28.     }
  29.  
  30. }
  31.  
  32. if (funcion == "check") {
  33.     if (valor == false){
  34.         document.getElementById(checkboxid).checked = true; *
  35.     }
  36.     else{
  37.         document.getElementById(checkboxid).checked = false; *
  38.         document.getElementById(imag).src = "images/modulo" + modulo + "_" + checkboxid + ".jpg";  *
  39.     }
  40. } //if funcion check
  41.  
  42. } *
  43. //]]>
  44. </script>

y lo llamo usando

Código HTML:
Ver original
  1. <img src="images/moduloa_<? echo $i; ?>.jpg" width="<? echo $wi; ?>" height="28" border="0" onMouseOver="check('over', 'a','<? echo $i; ?>',this.id);" onMouseOut="check('out', 'a','<? echo $i; ?>',this.id);" onclick="check('check', 'a','<? echo $i; ?>',this.id);" id="images/moduloa_<? echo $i; ?>.jpg" alt="" name="images/moduloa2_<? echo $i; ?>" />

entremedio hay unas llamadas php, pero omitamos, ya que no influyen en nada, el punto es que, cuando lo hago correr con fancybox, mi simple código deja de correr, alguien que me pueda hecha una mano?

Aqui se los dejo, http://tinyurl.com/762oglw, pinche el modulo A, y se abrira el fancybox.

No se que puedo hacer :(

Gracias de antemano