Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

How can I selectively refresh part of a page?

by jlistf (Monk)
on Jun 20, 2000 at 22:51 UTC ( #19066=perlquestion: print w/replies, xml ) Need Help??

jlistf has asked for the wisdom of the Perl Monks concerning the following question: (cgi programming)

Is there a way to change the text on a page without refreshing/reloading the whole page? I want to add a time to a page (with seconds) that constantly updates, but I'd rather not update the page every second. Is there some way to do this in perl? Would I need to use something like javascript or java?

Originally posted as a Categorized Question.

  • Comment on How can I selectively refresh part of a page?

Replies are listed 'Best First'.
Re: How can I selectively refresh part of a page?
by Kozz (Friar) on Jun 21, 2000 at 04:00 UTC
    This definitely requires some kind of complicity (activity) on the client (browser) side. For that, there's really only one viable approach: javascript. (There are other client-side scripting technologies, but javascript is preferable for a number of reasons.)
Re: How can I selectively refresh part of a page?
by audreyt (Hermit) on Jul 28, 2000 at 20:49 UTC
    If the "part of the page" which needs to be updated can actually be a separate page embedded within the larger page, use an IFRAME. Its source (URL) can then be a server-side component producing the dynamic content, with a REFRESH set to your desired interval.

    Alternatively...
    There's multipart/x-mixed-replace. Here is some pretty good background and tutorial: server push with javascript Also read about COMET.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://19066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2021-09-28 02:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?