Hi,

On Monday April 19 2010 14:45:38 marbin wrote:
> I am having problems changing the content of a TD element using the
> qx.bom.Collection API.
> I have code doing something like below in a component extending
> qx.ui.embed.Iframe:
> 
> var domCollection = qx.bom.Collection.create(this.getDocument());
> var td = domCollection.find("#myTD");
> td.empty();
> td.append("new content");
>         
> 
> Is this the way to replace the content of the TD? I have used jquery before
> and there you do something like 
> $("#myTD").html("new content")
> but I have not found any equivalent method in the Collection API.
> Seems like the empty() method does not have any effect, so I end up
> appending content.
> Is this a bug in the empty() method or did I misunderstand something here?
I guess you can use the method "replaceWith" to setup your new content.

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

Is this the method you searched for?

cheers,
  Alex

------------------------------------------------------------------------------
Download Intel® 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