http://mootools.net/shell/yL93N/1/
-Chase
http://mootools.net/shell/yL93N/5/
http://mootools.net/shell/yL93N/6/
js file:
=========
templates.push({title:'generic'});
var generic = new Class({});
template chooser:
========
if(templates.length > 0) {
select = new Element('select');
templates.each(function(el){
opt = new Option(el.title,el.title);
select.grab(opt);
});
}
so something like this w/ eval.
http://mootools.net/shell/yL93N/7/
I would use the suggestions of chone or ryan.
On Feb 17, 2:54 am, jiggliemon <ch...@agroism.com> wrote:
> My end goal is to load a class that will act as a template, So to add
> new templates, all i need to do is add another js file with a template
> class in it:
>
> js file:
> =========
> templates.push({title:'generic'});
> var generic = new Class({});
>
> template chooser:
> ========
> if(templates.length > 0) {
> select = new Element('select');
>
> templates.each(function(el){
> opt = new Option(el.title,el.title);
> select.grab(opt);
> });
>
> }
>
> so something like this w/ eval.http://mootools.net/shell/yL93N/7/