Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Aug 1st, 2010 | Syntax: JavaScript | Size: 0.59 KB | Hits: 20 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. file=states.json
  2. {
  3.   identifier:"abbreviation",
  4.   label: "name",
  5.   items: [
  6.         {name:"India", label:"India",abbreviation:"IND"},
  7.         {name:"USA", label:"USA",abbreviation:"USA"},
  8.         {name:"UK", label:"UK",abbreviation:"UK"},
  9.         {name:"Germany", label:"Germany",abbreviation:"GER"},
  10.          ]
  11. }
  12.  
  13. --------In the form which uses this json file--------------------
  14. <div dojoType="dojo.data.ItemFileReadStore" jsId="stateStore" url="states.json">
  15. <input dojoType="dijit.form.ComboBox"  value="Select Country" store="stateStore" searchAttr="abbreviation" name="country" id="country" onChange="populateCity"/>