views:

20

answers:

0

Here is my XBL code:

<binding id="CF-cart">
    <content>
        <xul:hbox onclick="return productClick(event)">
            <xul:label value="Text line 1"/>
            <xul:description>
                <children includes="#text"/>
            </xul:description>
        </xul:hbox>
    </content>
</binding>

And JS:

var elem = document.createElement("vbox");
elem.className = "CF-cart";
elem.appendChild(document.createTextNode("Text line 2"));

It works fine except one thing: When I click on "Text line 2", the function productClick(event) is not be called. It will be called when I click on "Text line 1"

Any clues?