Thanks, that did it.
/Mattias

-----Original Message-----
From: Alexander Steitz [mailto:[email protected]] 
Sent: den 20 april 2010 10:26
To: [email protected]
Subject: Re: [qooxdoo-devel] qx.bom.Collection, replacing content in TD

Hi,

On Tuesday April 20 2010 09:42:43 marbin wrote:
> No, not really. With the snippet above, you would end up replacing the td
> element itself.
> If you initially have
> ..
> <tr>
> <td id="#myTD">old content></td>
> </tr>
> 
> you would end up with
> <tr>
> new content
> </tr>
> 
> I want something similar to the DOM-level "innerHtml", i.e. replacing the
> content of the TD element.
Okay, now I get it :)

--snip--
var domCollection = qx.bom.Collection.create(this.getDocument());
var td = domCollection.find("#myTD");
td.contents().replaceWith("new content");
--snip--

The "contents" method does return the whole content of the previous collection 
("#myTD") and with the "replaceWith" you can set the "innerHTML" of the new 
collection (retrieved by "contents()").

cheers,
  Alex


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to