Solved

tail -f via dhtml?

Posted on 2000-03-04
4
281 Views
Last Modified: 2006-11-17
Hi All,

   I have a web page that will kick off a process that runs for some time (~ 1hr).  I would like to stream the output from that program back to the web page.  Is this possible?  It seems I will have to use server push I guess.  The process runs on the web server.  I was hoping to somehow use javascript/dhtml.


0
Comment
Question by:bitsrfr
4 Comments
 
LVL 4

Accepted Solution

by:
brigmar earned 50 total points
ID: 2583353
How about having the output streamed to a HTML file that has a meta refresh tag of say.... 60 seconds. The browser will then request a new version of the page evey minute.

<HTML>
 <HEAD>
  <META http-equiv="refresh" content="60">
 ..etc


Brian
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 2583860
To use javascript you would need to have a frameset and loop a cgi to read the latest output and use
top.visibleframe.document.write('............');
top.visibleframe.scroll(0,10000000000);
to add to the page

Michel
0
 
LVL 1

Expert Comment

by:larholm
ID: 2584884
To use true streaming, you must let the server send out the HTML file without closing it.

This can be done in two ways, either via Perl or through your own custommade webserver (which I did), depending on your needs.

/Thor
0
 

Author Comment

by:bitsrfr
ID: 2773682
This is a pretty low weight idea.  This will work pretty well.  Thanks.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question