NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP AND AOL Instant Messenger

csnyder chsnyder at gmail.com
Sun Oct 3 12:58:28 EDT 2004


Yet ANOTHER way to do this is using Dynamic Javascript, which gets
dicey in some browsers (Safari) but otherwise works pretty well if you
know what you're doing.

1) script tag in <head> of the Document includes external.js
2) external.js rewrites part of the Document with new html content
3) external.js then issues a setTimeout for myrefresh()
4) myrefresh() uses the DOM to add another script tag to the <head> of
the Document
5) goto 1

When the browser sees that the new <script> has been added to the
<head>, it dutifully fetches and executes the script. Whether this is
a bug or a feature is still moot.



More information about the talk mailing list