[thelist] Creating Divs on the fly

Peter Small peter at genps.demon.co.uk
Thu Aug 10 11:05:52 CDT 2000


Eric Costello wrote (see full post below),

>These are hacks, designed to subvert the
>document based orientation of the web and turn it into an application
>platform.
>

It's interesting that you see this as a hack. When this technique of hidden
frames was first explained to me it was explained with an apology that it
was an awkward and inelegant way around a problem. I didn't see it this way
at all. To me it was the key to designing Web pages with an object oriented
strategy. I was quite excited because this is exactly what you do with OOPS.

In OOPS you create an object in RAM that is programmed to carry out certain
instructions when it is sent a message. By creating many different objects
in RAM, you can build quite complex systems that pass messages around and
carry out sohisticated and flexible tasks.

If you think of a hidden window as an object in RAM that is programmed to
do certain things when you send it appropriate messages, that "hack" turns
into a powerful programming concept. If you have worked with C++ or Lingo
in Director you can fully appreciate the significance of this hidden window.

peter
http://www.avatarnets.com




>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
>
>
>---------------------------------------
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt !







More information about the thelist mailing list