Onload file . txt

Asked

Viewed 81 times

-1

You guys are late. I need to upload the contents of a file. txt to a web page, since I need to have control over the scroll, I need to keep it always at the end of the page, and a constant update.

  • What language you are using?

  • html, and js. have an application and am limited only to these parameters, also have css support.

1 answer

1


<!DOCTYPE html>
  <html>
    <head>      
      <script type="text/javascript">
        window.onload = pageScroll;
        var a = 1000;
        function pageScroll()
          {
            window.scrollBy(0,a);
            scrolldelay = setTimeout('pageScroll()', 1000); 
              a += 10;
              document.getElementById('relatorio').style.height = a +"px";
              var f = document.getElementById('relatorio');
              f.src = f.src;
              
          } 


      </script>

  </head>
    <body>
      <div>
        <iframe
          id="relatorio"
          src="input.txt"
          width="auto"          
          frameborder="0"
          scrolling="no"
          allow-scripts= "pageScroll;"
          style="
            position:
            relative;
            width: 440px;"
            target="_self">
                    
        </iframe>
      </div>
    </body>
  </html>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.