Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Nov 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scan-In: Watch the page being written.

    Here is a simple script to simulate the page being coded as it loads.

    Here is the script....

    ----------------------------------------

    <script language="JavaScript">
    var x = 2;
    var y = 0;
    var h = 0;
    function LineBy()
    {
    bodyarray = document.body.innerHTML.split('\n');
    document.getElementById('mover').style.height = document.body.clientHeight - h;
    var currentline = String(bodyarray[x]);
    if (currentline.charAt(y) == "<") displayed = "&lt;";
    else if (currentline.charAt(y) == '"') displayed = "&quot;";
    else (displayed = currentline.charAt(y))
    document.getElementById('mover').innerHTML+=displayed;
    document.getElementById('mover').style.top = parseInt(document.getElementById('mover').style.top) + 2;
    if (y <= currentline.length) {y++;}
    else {y=0;x++;document.getElementById('mover').innerHTML="";}
    if (parseInt(document.getElementById('mover').style.top) >= (document.body.clientHeight-20)) {document.getElementById('mover').style.visibility="hidden";return;}
    h = h + 2;
    setTimeout('LineBy()',1);
    }
    </script>

    ----------------------------------

    Place this inside the body tag.

    ----------------------------------

    onload="LineBy()"

    ----------------------------------

    Then include this DIV inside the body tag.

    ----------------------------------

    <div id="mover" style="font-size:7pt; position:absolute;top:0; background-color:FFFFFF; visibile:hidden; width:100%;z-index:5;height:100%"></div>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This would be nicer to see in action with a link....
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •