[thelist] Creating Divs on the fly

Eric Costello eric at schwa.com
Thu Aug 10 10:13:41 CDT 2000


Karen wrote:
>I'm having a bit of trouble however.  The thing that seems to be stopping
me
>is that I can't create new Divs after the initial loading of the page is
>complete, so I guess my first question is if this is, in fact, possible?

James wrote:
>>I find IE/Mac is a whole easier to do new Div creation with than IE/Win.
Its
>>impossible in NN 4.x

That is not true, it is possible to create new Divs in all the 4+ browser.
You must use javascript to do document.write()s, but you can do it
endlessly.

But your bigger question Karen, has to do with the differences between
client side and server side scripting, which has been the topic of
discussion here on the list for a while. The only way to do what you want to
do (assuming I am understanding your correctly) is with a hidden frame that
makes periodic calls back to the server for any new information, and then,
upon finding any, manipulates the contents of your visible frame through
javascript. If you don't need steady polling of your server, and only need
to update its contents upon user interaction, you can have your visible
frame intercept clicks (returning "false" on link clicks and form submits)
and pass them along to your hidden frame, which can then query your server
and (as above) update the visible frame through javascript. Much uglier
would be having your hidden frame reload every x seconds to look for new
info on the server.

Does that make sense to you? These are hacks, designed to subvert the
document based orientation of the web and turn it into an application
platform.

Eric

Eric Costello
eric at schwa.com
http://glish.com





More information about the thelist mailing list