Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter lw2dtq

    (@lw2dtq)

    IE doesn’t show the javascript output. and firefox does. I guess that my problem is not exactly the script, because I have triyed with other, even with more simple code and the same happens. The problem my be in how I insert the tags or something like that.

    Thread Starter lw2dtq

    (@lw2dtq)

    ok. Have already post you the code. And the test link is:

    https://www.denicolas.com.ar/noticias

    Forum: Fixing WordPress
    In reply to: Typewriter effect?
    Thread Starter lw2dtq

    (@lw2dtq)

    Thanks, but does not work for me. I will try again

    Forum: Fixing WordPress
    In reply to: Typewriter effect?
    Thread Starter lw2dtq

    (@lw2dtq)

    I don’t need at the moment insert the effect in a post. I have insert that in the index.php but does not work.

    Forum: Fixing WordPress
    In reply to: Typewriter effect?
    Thread Starter lw2dtq

    (@lw2dtq)

    This is teh simple html page:

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
    <html>
    <head>

    <title>Titulo de la pagina</title>
    </head>

    <body>

    <div id=”ticker”>
    <H2 class=”ticker” id=”mtxt”></H2>
    <br class=”sep” clear=”all”>
    <SCRIPT LANGUAGE=”JavaScript”>
    function stringreplace(str,srchfor,rplwith){
    while (str.indexOf(srchfor)>-1) {
    pos= str.indexOf(srchfor);
    str = “” + (str.substring(0, pos) + rplwith + str.substring((pos + srchfor.length), str.length));
    }
    return str;
    }
    // Pasarela de Noticias
    var listanoticias=new Array();
    var conteo=0; // item actual
    var actual = “”;
    var definitivo = “”
    var i=-1; // letra que se esta tipeando

    var caracteresbuenos = new Array(‘á’, ‘é’, ‘í’, ‘ó’, ‘ú’, ‘?’, ‘?’,’?’, ‘?’, ‘”‘, ‘?’, ‘?’,’ü’, ‘“’, ‘”’);
    var caracteresmalos = new Array(‘á’, ‘é’, ‘í’, ‘ó’, ‘ú’, ‘ñ’, ‘Ñ’,’¿’, ‘¡’, ‘"’, ‘Ç’, ‘ç’,’ü’, ‘“’, ‘”’);

    function newsticker(){
    // proximo caracter del item actual
    for (var x = 0; x <= caracteresbuenos.length; x++){
    listanoticias[conteo][0] = stringreplace(listanoticias[conteo][0],caracteresmalos[x],caracteresbuenos[x]);
    }
    if (i < listanoticias[conteo][0].length – 1){
    i++;
    temp1 = listanoticias[conteo][0];
    temp1 = temp1.split(”);
    actual = actual + temp1[i];
    temp2 = listanoticias[conteo][1];
    document.getElementById(‘mtxt’).innerHTML = “<span class=rj>”+actual+”</span><span class=t07a>|</span>”;
    setTimeout(‘newsticker()’,50)
    return;
    }
    // item nuevo
    i = -1;
    actual = “”;
    if (conteo<listanoticias.length-1)
    conteo++;
    else
    conteo=0;
    setTimeout(‘newsticker()’,5000)
    }
    var ii = 0;

    listanoticias[ii]=new Array(“This is the text. Just an example”,””)

    setTimeout(‘newsticker()’,2001)
    </script>
    </div>

    </body>
    </html>

Viewing 5 replies - 1 through 5 (of 5 total)