Mozilla XUL

I was wondering if anyone has used an AW Grid with Mozilla XUL extension. I have been able to do it by basically "embedding" a html file within a XUl iframe. The html file is much like some grid example with basic grid definition ... css and creating a grid object, defining number of rows and columns and some other initial configuration. Further interaction with the grid using xul controls/javascript was done in a awkward and roundabout way (using notifiers/observers). That was the only way I could get it to work. I tried embedding pretty much the html file example content directly within xul but it would not render the right.

So if anyone has any experience with this, I would appreciate it.


March 26,
I am not expert in XUL, so here is the code I was trying:

<?xml version="1.0"?>
<?xml-stylesheet href="file:grid.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
        <button label="Test"></button>
    <hbox height="200px" width="400px">
        <html:div id="myBox"></html:div>

    <html:script src="grid.js"/>
        #myBox {
         	-moz-box-flex: 1;
         	position: relative;
         	overflow: hidden;
         	border:1px solid #ccc;

        #myGrid {
            width: 100%;
            height: 100%;

        function insertHTML() {
            var div = document.getElementById("myBox");

            var obj = new Active.Controls.Grid;

            var s = "";
            s += "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
            s += obj.toString().replace(/&nbsp;/g, "");
            s += "</html>";

            var parser = new DOMParser();
            var doc = parser.parseFromString(s, "text/xml");

You have to copy style files and grid.js to the same directory and then, well, you can see the grid and even resizing works :-) but not much else.

I found that neither range.createContextualFragment nor innerHTML work inside XUL (contrary to the documentation). If anyone can tell whats wrong here I would really appreciate it.

BTW: Why are you using AW grid in XUL instead of native grid ?????
Alex (ActiveWidgets)
March 27,

This topic is archived.

See also:

Back to support forum