« Return to Thread: FilteringTable double click
mengel wrote:Great. I tried connecting it to the tbody element, but it didn't work,
but connecting it to the table itself worked fine. Thanks for saving my
users some CPU.
Working code:
var body = document.getElementById('aBLTblePlaceHolder');
dojo.event.connect(body, "ondblclick", BuildCodes, "rowSelected");
Did Not work:
var body =
document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tbody');
dojo.event.connect(body, "ondblclick", BuildCodes, "rowSelected");
Thanks,
Matthew Engel
Senior Programmer/Analyst
State University of New York at Stony Brook
mengel@notes.cc.sunysb.edu
Tom Trenka <dojo-interest@dept-z.com>
Sent by: dojo-interest-bounces@dojotoolkit.org
12/20/2006 10:24 AM
Please respond to
dojo-interest@dojotoolkit.org
To
dojo-interest@dojotoolkit.org
cc
Subject
Re: [Dojo-interest] FilteringTable double click
Can't answer you on the event question (though you shouldn't ever assign
an
event directly like that), but I can say that you should probably attach
that event handler either to the tbody element or to the table element,
and
not to every row. That way it's only created once, and you don't have to
try to reassign it to each new row that is created.
trt
mengel wrote:
>
> In setting up the double click events for a Filtering Table
> programmatically, how come this works:
>
> dojo.event.connect(row[i], "ondblclick", BuildCodes,
> "rowSelected");
>
> but this doesn't:
>
> row[i].ondblclick = BuildCodes.rowSelected;
>
> where row[i] is the row of the FilteringTable that I'm working with.
>
> Are they not programmatically equivalent?
>
>
> Matthew Engel
> Senior Programmer/Analyst
> State University of New York at Stony Brook
> mengel@notes.cc.sunysb.edu
> _______________________________________________
> Dojo FAQ: http://dojo.jot.com/FAQ
> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
> Dojo-interest@dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>
--
View this message in context:
http://www.nabble.com/FilteringTable-double-click-tf2829024.html#a7991888
Sent from the Dojo mailing list archive at Nabble.com.
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest@dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest@dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest
« Return to Thread: FilteringTable double click
| Free embeddable forum powered by Nabble | Forum Help |