Re: update content without refreshing
by dws (Chancellor) on Jun 08, 2003 at 16:53 UTC
|
I had been looking at ways to update content of a web page without using any auto refreshing meta.
There's a way to do this using "pushlet" technology, but it's rather complicated (involving Frames, JavaScript, and persistent browser connections).
The idea behind a pushlet is that a hidden frame keeps a long-running HTTP GET going to a server. The server dribbles out JavaScript commands, which get interpreted and executed by the browser as they arrive. These commands invoke JavaScript routines that are embedded in either a parent window or in another frame. Typically, a side-effect of this invocation is to refresh part or all of some visible frame.
This collaboration requires that the server-side keep a long-running connection. Most off-the-shelf web servers will time connections out.
KnowNow, Inc. pioneered this technology (though they didn't invent it). They also recently started a SourceForge project to release some of their code publicly.
A google search on "pushlet" might turn up more usable info.
| [reply] |
|
| [reply] |
Re: update content without refreshing
by atcroft (Abbot) on Jun 08, 2003 at 18:03 UTC
|
To be honest, it sounds to me if you are looking for information on using NPH (non-parsed header) scripts, using a content-type such as multipart/mixed or multipart/x-mixed-replace.
Perhaps these links may help:
Hope that helps some. I'd be interested to hear what you find, if you're willing to report back on it.
| [reply] |
Re: update content without refreshing
by BrowserUk (Patriarch) on Jun 08, 2003 at 17:05 UTC
|
If your desire is to have one (or more) small parts of the screen update without the whole screen refreshing, you could try using iframe (and/or layer) tags around the area(s) to be updated and use meta refresh tags on the pages displayed there.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
| [reply] |
Re: update content without refreshing
by TomDLux (Vicar) on Jun 08, 2003 at 21:04 UTC
|
If it's only limited components which have to change, check out OpenThought by Eric Andreychek. It's at CPAN.
OpenThought is an interesting engine for communication between the web server and web page.
| [reply] |
|
Thanks for the plug :-)
For those who haven't used it before, OpenThought is a web application framework which allows you to update portions of the screen without reloading the page.
If it's only limited components which have to change
OpenThought has grown a lot over the last year. There used to be a limitation that form elements were the only visual items which could be updated without refreshing the screen. However, that has now been extended into any HTML item with an "id" tag. Basically, that could be anything :-)
You're also able to send in JavaScript code from the server, access existing JavaScript functions and variables, and sessions are automatically managed for you -- no more need for cookies or adding session id's to the end of each url. It's good stuff :-)
There's a version in CVS that supports mod_perl 2.x and has some significant improvements in the installation system. It will hopefully be released within a few days.
Good luck!
-Eric
--
Lucy: "What happens if you practice the piano for 20 years and then end up not being rich and famous?"
Schroeder: "The joy is in the playing."
| [reply] |
Re: update content without refreshing
by The Mad Hatter (Priest) on Jun 08, 2003 at 16:29 UTC
|
Uh, Activescores uses the meta refresh: <meta http-equiv="refresh" content=120> Royalscore doesn't refresh automatically for me.
Why don't you want to use the meta refresh technique?
Update The "old version" of Royalscore updates for me, but that also uses the meta refresh. If the link to Royalscore you provided updates for you, I'd guess it was some javascript hackery (there sure is a lot of it in the page). | [reply] [d/l] |
Re: update content without refreshing
by Jenda (Abbot) on Jun 08, 2003 at 18:44 UTC
|
DHTML?
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature | [reply] |