Skip to content

Instantly share code, notes, and snippets.

@neonstalwart
Created October 29, 2009 02:51
Show Gist options
  • Save neonstalwart/221072 to your computer and use it in GitHub Desktop.
Save neonstalwart/221072 to your computer and use it in GitHub Desktop.
new dijit.form.ComboBox({
store: new dojo.data.ItemFileReadStore({
data: cityJson
}),
autoComplete: true,
query: {
state: "*"
},
style: "width: 150px;",
required: true,
id: "city",
onChange: function(city) {
dijit.byId('state').attr('value', (dijit.byId('city').item || {
state: ''
}).state);
}
},
"city");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment