EriRyoutan Posted April 14, 2006 Share Posted April 14, 2006 Hi again.I'm working on writing a page that keeps getting new content added to it like every few minutes, and i would like it to be either streaming or auto-refreshing. I've heard of it possible with PERL but I'd like to do it using only PHP and/or JavaScript (or HTML, but that's kind of a given)Thanks for reading, and hope somebody out there has a (simple?) answer.EDIT: Oh! and does anybody know if $_SESSION[''] $_GET[''] etc, etc. have to be capitalized? Quote Link to comment Share on other sites More sharing options...
neylitalo Posted April 15, 2006 Share Posted April 15, 2006 If you aren't particular about whose browsers you support, you may be able to put the Javascript innerHTML property. I don't think browsers other than Gecko-based or IE support it, though.Here's a quick & dirty demonstration:[code]<html><head><script language="javascript">function increaseCounter(){ document.getElementById('testdiv').innerHTML ++; setTimeout('increaseCounter();', 1000);}</script></head><body onload="increaseCounter();"><div id="testdiv">1</div></body></html>[/code]Load that in your browser, and see if you can make something useful out of the innerHTML property. I'm sure www.w3schools.com has something they can teach you about it.And you may also want to check out AJAX - Asynchronous Javascript with XML. It's designed specifically for this purpose. Support the creators of this community and go to [a href=\"http://www.ajaxfreaks.com\" target=\"_blank\"]http://www.ajaxfreaks.com[/a] for more info. I'm afraid I've got no experience with that, so I can't help there. :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.