Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Streaming text, with focus always on bottom

Posted on 1997-10-30
2
Medium Priority
?
199 Views
Last Modified: 2013-12-25
I found out a way in Netscape to stream text to the browser without any buffering.  In other words, as my CGI programs gets the data (trace data from another program), it sends it to the browser and the browser keeps streaming the data.  Only nice feature missing would be for browser to show the text at the bottom and scroll, instead of keeping focus on top.  I suspect JavaScript might help here, but I know very little about it.  Java's not a realistic option.  
0
Comment
Question by:steve_howell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
Holger101497 earned 360 total points
ID: 1855394
The solution is not so complicated: At the top of your file, you have to send the following code:
<script language="JavaScript1.1">
<!-- hide code
function scrollIt() {
  window.scroll(0,100000); //scroll to bottom
  scr_id=setTimeout("scrollIt()",1000);
}
scrollIt();
// end of hiding -->
</script>

This will scroll the window to the bottom once per second (every 1000 milliseconds) (the function calls itself).
Then, when your file is complete, the last lines to send are:
<script language="JavaScript1.1">
clearTimeout(scr_id);
</script>

this stops the scrolling.
If you want to see this code "in action", you can go to netchat.city.de - this is a very nice real-time chat that uses the same technique: it keeps sending lines as people "speak" and displays them right away.

P.S.: This will only work in Netscape 3+, because IE does not support a scroll-function. IE 4 might support it and it would then probably be the same one.

Good luck ;-)
0
 

Author Comment

by:steve_howell
ID: 1855395
Great answer.  This should solve my problem perfectly.  
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Suggested Courses

670 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