[Dojo-interest] FilteringTable double click

Tom Trenka dojo-interest at dept-z.com
Wed Dec 20 13:22:15 MST 2006


Second one didn't work because you tried to attach it to a node list and not
a node.

      var body = 
document.getElementById('aBLTblePlaceHolder').getElementsByTagName('tbody')[0];
      dojo.event.connect(body, "ondblclick", BuildCodes, "rowSelected");   

trt


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 at notes.cc.sunysb.edu
> 
> 
> 
> Tom Trenka <dojo-interest at dept-z.com> 
> Sent by: dojo-interest-bounces at dojotoolkit.org
> 12/20/2006 10:24 AM
> Please respond to
> dojo-interest at dojotoolkit.org
> 
> 
> To
> dojo-interest at 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 at notes.cc.sunysb.edu
>> _______________________________________________
>> Dojo FAQ: http://dojo.jot.com/FAQ
>> Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
>> Dojo-interest at 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 at 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 at dojotoolkit.org
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> 
> 

-- 
View this message in context: http://www.nabble.com/FilteringTable-double-click-tf2829024.html#a7997137
Sent from the Dojo mailing list archive at Nabble.com.



More information about the Dojo-interest mailing list