inputEx - DSSelectField Usage

Using a DataSource

How to populate the selectField using a Datasource :

var myDataSource = new YAHOO.util.XHRDataSource("books.json"); myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; myDataSource.responseSchema = { fields: ["id","quantity","amount","title", "category"], resultsList: "Results" }; new YAHOO.inputEx.DSSelectField({name: 'country', datasource: myDataSource, valueKey: "id", labelKey: "title", parentEl: 'container1'});