Untitled
By: a guest | Aug 1st, 2010 | Syntax:
JavaScript | Size: 0.59 KB | Hits: 20 | Expires: Never
file=states.json
{
identifier:"abbreviation",
label: "name",
items: [
{name:"India", label:"India",abbreviation:"IND"},
{name:"USA", label:"USA",abbreviation:"USA"},
{name:"UK", label:"UK",abbreviation:"UK"},
{name:"Germany", label:"Germany",abbreviation:"GER"},
]
}
--------In the form which uses this json file--------------------
<div dojoType="dojo.data.ItemFileReadStore" jsId="stateStore" url="states.json">
<input dojoType="dijit.form.ComboBox" value="Select Country" store="stateStore" searchAttr="abbreviation" name="country" id="country" onChange="populateCity"/>