Dynamically Generating Javascript using Parameters
I love re-using code, and really believe in DRY.
In doing ActiveJquery, I want my grids to be very re-usable.
For one, I need to use multiple grid/sub-grids to handle Rails
relationships, second I need to be able to have multiple grids
in one page. And want to do all of this with the least amount of code.
In ActiveJquery, the Grid code, is generated on the fly. While it looks like a normal
call, its actually hitting controller code tucked inside the plugin.
So when we request the javascript code for a particular controller, the ActiveJquery
code generates the appropriate javascript on the fly.
In doing, the sub-table, I need to have parameters passed in, so I rely on standard
Rails Semantics when handling HTML.
This technique lets me generate customized javascript on the fly, making the generator re-usable, and
the grid re-usable any number of times in the same application.


Recent comments
25 weeks 9 hours ago
25 weeks 1 day ago
26 weeks 6 days ago
29 weeks 1 day ago
43 weeks 6 days ago
46 weeks 6 days ago
47 weeks 5 days ago
47 weeks 5 days ago
48 weeks 4 hours ago
50 weeks 1 day ago