Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/07/2006, 06:32
ryden13
 
Fecha de Ingreso: abril-2005
Mensajes: 5
Antigüedad: 19 años
Puntos: 0
Funciona en IE pero no en Firefox

Hola

Tengo un script que hace el tipico "tablo de anuncios" que se van desplazando. El problema es que en IE funciona perfectamente pero en Mozilla no hace nada.
El código esta incrustado en PHP, ya que los anuncios los saca de una BD en MySQL. Os pongo el código a ver si me podeis echar una mano porque ya no se que hacer .
Graciaaaaaaaas

<script type="text/javascript">
// ancho
var marqueewidth=200
// alto
var marqueeheight=200
// velocidad
var speed=1
// contenido del scroll
var marqueecontents='<?php echo $aviso?>'
if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheig ht+'">'+marqueecontents+'<\/marquee>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.w rite(marqueecontents)
document.cmarquee01.document.cmarquee02.document.c lose()
thelength=document.cmarquee01.document.cmarquee02. document.height
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thel ength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marque eheight
scrollit()
}
}
window.onload=regenerate2
</script>