On 26 Feb 2006 at 13:02, prla wrote:

> td_list = [item.Name, item.Quantity, item.Priority,
> item.PreferredShop, edit_del]; return TR({'onClick': 'showBox()'},
> map(col_display, td_list));


use 'onclick' instead, not 'onClick'.

> This thread seems to touch the same issue, but unfortunately no
> conclusive answer:
> http://groups.google.pt/group/mochikit/browse_thread/thread/fce727b25e
> 29dc57/fba90668f17027b1

That was my thread. The  problem I was having was that I hid the div
containing
the table in an onblur handler (that was fired by the user clicking on
the tr). For
some reason both IE and FF decide to cancel the onclick event if the
table gets
hidden. So, not hiding the table solved my problem.

My code looks like this (and it works):

this.expand_children = function(item, sequence) {
        var td = partial(TD, null);
        var B = MochiKit.DOM.createDOMFunc('b', null);

        var tr = TR({'selector':item.tariffcode,
                                 'class':'R'+(sequence % 2),
                                 'onclick':self.row_clicked},
                                td(B(item.tariffcode)),
                                td(item.description)
                        );

        return tr
}


self.row_clicked is just a bound method on an object. You could use a
string here
instead if you wish.

I eventually use MochiKit.DOM.replaceChidlNodes to insert the table
into the
DOM.

--
Brad Clements,                [EMAIL PROTECTED]    (315)268-1000
http://www.murkworks.com
AOL-IM or SKYPE: BKClements


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to