Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/02/2007, 16:52
Avatar de Muzztein
Muzztein
 
Fecha de Ingreso: agosto-2002
Ubicación: Hangar 18
Mensajes: 1.703
Antigüedad: 22 años, 5 meses
Puntos: 16
teletype text no funciona en firefox

Hola!
tengo un problema

El siguiente codigo, lo que hace es tirar un texto en la pantalla como si fuera escrito por una maquina de escribir. Un caracter a la vez.
El problema es que si bien funciona en IE6, en firefox no hay caso.


¿alguien sabe el por que de este comportamiento????

como lo puedo solucionar???
alguien ttiene alguna funcion que me pueda compartir que haga lo mismo pero que funcione tanto en IE como fire fox????????

de antemano gracias!!!!!!!!!




PD: googlie como endemoniado, pero no tuve exito.


Código PHP:

<html>

<
head>
<
script type="text/javascript">

<!-- 
var 
pos=0;
var 
speed=25;
var 
msg="<pre>tesssssssssst</pre>"

function 
Type(){
pos++;
 if (
msg.substring(pos-1,pos) == " ")
 {
  
pos++
 }
text=msg.substring(0,pos);
 if (
document.layers)
 {
  
document.layers.layerA.document.open();
  
document.layers.layerA.document.write("<div style='position:absolute;top:0px;left:0px;font-family:Courier New;font-size:18px;color:#00ff00'>" text "</div>");
  
document.layers.layerA.document.close();
 }
else if (
document.all)
document.all.layerA.innerHTML=text;
 if (
pos msg.length)
 {
  
tmer=setTimeout('Type();',speed);
 }
}
//-->


</script>

<title>Pagina nueva 1</title>
</head>

<body text="#00FF00" bgcolor="#000000"  onload="Type()" style="font-family: Courier New">
<div id="layerA"></div>


</body>

</html>