> -----Original Message-----
> From: Don L [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 19, 2008 11:08 PM
> To: CF-Talk
> Subject: Re: "Voodoo" programming case one
> 
> 
> Thanks.  As I indicated in my very first post, it was working (at that
> point I did not test it with IE6 though). Later I tested with IE6, and
> it seems fine as well.  I was curious to know if there's a better
> approach... It's good to know you endorse this approach as well.

Well... I guess it's like everything else: there are a thousand ways to do
anything and what makes them "better" will change depending the need.

For pure speed not much is going to improve upon Isaac's single line of code
and one DOM change.  But it does require some pre-work.  There are other
ways to do the same thing where the table in question needs no prior set up.

One script could accepts a DOM reference to a table and do all the work.  It
could - just by looping over the DOM -  add a link or control to the headers
to collapse the columns, add all of the style information needed, all of the
event information, etc.

This would be more complex, but in the end you'd have a simple-to-use script
that could add this functionality to ANY table with a single line of code
(and NO manual changes to the table).  You could also add in row sorting,
cell selection, etc - any features you want.

This would definitely be "better" in the sense of being more encapsulated,
more portable and more reusable.

Jim Davis


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301621
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to