I’ve been looking this evening for a way to inject an “option” into select list using Mootools (work for 1.11 and 1.2 version),

Here the solution :

var MyElement =  new Element('option');    
MyElement.inject($('my_select'));
MyElement.setProperty('value','0');
MyElement.appendText('hello');
Share and Enjoy:
  • Facebook
  • Twitter
  • del.icio.us
  • Print
  • Google Bookmarks
  • Digg
  • viadeo FR
  • email