¿Quieres registrarte?

Script funcionando en IE que no funciona en Firefox

Citar            
MensajePublicado: 01 Jul 2009 09:24 am
Hola,

Estoy poniendo un javascript para escalar un swf segun el tamaño del navegador. Funciona perfectamente en IE pero en Firefox nada.

Código :

function getHeight(){
  if(document.body.clientHeight < LimY2){
      return document.body.clientHeight;
   } else{
      return LimY2;
   }

function getWidth(){
   
   if(document.body.clientWidth < LimX2){
      //return document.body.clientWidth;
      return "100%";
   } else{
      return LimX2+"px";
   }

function setFlashSize(){
   document.getElementById["VentanaFlash"].style.height = getHeight()+"px";
   document.getElementById["VentanaFlash"].style.width = getWidth(); 
   setScrollIE();   
}



En firefox supuse que no funcionaba por el "document.body.clientWidth" y lo cambie por "window.innerWidth" pero lo que veo en el depurador es que las funciones getHeight() y getWidth() devuelven undefined. Lo raro es que proble a poner directamente un return 100 y tambien me daba "undefined".

Alguien sabe como podría poner ese código para que funcione tambien en firefox?


GRacias

elphomega


clabLevel: 3



msie7
      MP    
Citar            
MensajePublicado: 04 Jul 2009 10:31 am
Ninguna idea? ¿Algún script que haga lo mismo y funciones en IE y firefox aunque sea diferente?

Muchas gracias

elphomega


clabLevel: 3



msie7
      MP    

   Página 1 de 1

Responder al tema
Respuesta Rapida


 

 

Cristalab BabyBlue + BloodBerry © 2007 Cristalab
Powered by phpBB © 2001, 2007 phpBB Group

3 6 7 8 10 11 12 14 15 17 18 28 34 38 40 42 44 45 46 47 48