tags:

views:

154

answers:

1

I have an array data = [{'name':'Bob','email':'[email protected]'}]

How can I render this array using XUL elements (like a table in HTML)? I'm using pure javascript (do not using any JS framework)

+1  A: 

How do you want it to look? There's xul:listbox (example), xul:tree, and you can also use HTML table if it's exactly what you need.

Nickolay
I want it to display like that: http://shopping.cazoodle.com/public/images/caddy_01.jpg (offer lists) Is it well-formed if I use HTML element in XBL files? Currently I'm only using XUL elements
hvtuananh
It is not rare to put HTML elements in XUL (usually in a <description> tag), but I was thinking of using an iframe. I recommend trying all three and picking for yourself, as there are many factors affecting what to pick.
Nickolay
Yet another choice is a XUL grid ( https://developer.mozilla.org/en/XUL_Tutorial/Grids ) but Nickolay is right. You should try them all (including an html:table right in the XUL, or in an iframe) and then evaluate which one works the best.
MatrixFrog