[cells-devel] observer design question
Andy Chambers
achambers.home at googlemail.com
Fri Mar 28 15:31:35 UTC 2008
Sorry. I keep on sending this stuff to Kenny rather than the list.
I've gotta get into the habit of
hitting "reply to all" instead of just "reply".
On Fri, Mar 28, 2008 at 3:26 PM, Andy Chambers
<achambers.home at googlemail.com> wrote:
> On Fri, Mar 28, 2008 at 3:15 PM, Ken Tilton <kennytilton at optonline.net> wrote:
> > >
> > > $("#my-id").html("Hello World");
> > >
> > > Translated, that means find the html element with id "my-id" and set the html
> > > inside it to be "Hello World". If I can just keep track of all the
> > > little changes, I'll
> > > send a list of these commands to be eval'd on the client.
> >
> > Coolio. I am about to send something with the OpenGL version to help
> > with some ideas.
> >
> > Question: Can you feed #my-id to the browser and then reference it later
> > in a page send? Or must it originally arrive as part of a larger X/HTML
> > tree, only after which it can be referred to directly?
>
> If you mean "Do all id's have to be known up front?". The answer is no. The
> example above could be changed to
>
> $("#my-id").html("<p id=\"my-id2\">some more stuff</p>");
>
> and now we have a new fully fledged node in the DOM with all the rights
> and privileges of whatever was initially sent.
>
More information about the cells-devel
mailing list