Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/05/2012, 15:42
rony1880
 
Fecha de Ingreso: mayo-2011
Mensajes: 38
Antigüedad: 13 años
Puntos: 0
Javascript no me funciona en chrome

hola,
Tengo un codigo en javascript de un texto en movimiento y no me funciona en el explorador chrome..
A continuacion esta el codigo para ver si me pueden ayudar..


Cita:
//en el head
Código:
<script language="JavaScript" type="text/JavaScript">

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

</script>

Cita:
//fuera del html
Código:
<script language="javascript1.2">
//Specify speed of scroll. Larger=faster // (ie: 5)
var scrollspeed=cache=1

function initialize(){
marqueeheight=document.all? parent.document.all.datamain.height : parent.document.getElementById("datamain").getAttribute("height")
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj.style.top=230
thelength=dataobj.offsetHeight
setTimeout("scrolltest()",200)
}


function scrolltest(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top=230
setTimeout("scrolltest()",40)
}


window.onload=initialize

</script>

Que tengo que agregarle o cambiarle para que me funcione en todos los exploradores???

Les agradeceria su ayuda