Solved

tail -f via dhtml?

Posted on 2000-03-04
4
279 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…

895 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now