Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
  <link rel="stylesheet" href="https://js.arcgis.com/3.21/dijit/themes/claro/claro.css">
  <script>dojoConfig = { async: true }</script>
  <script src="https://js.arcgis.com/3.21/"></script>
  <script>
    require(["dijit/form/Select",
      "dojo/data/ObjectStore",
      "dojo/store/Memory",
      "dojo/domReady!"
    ], function (Select, ObjectStore, Memory) {
      var data = [
          { id: 12, label: 'General lakebed mapping' },
          { id: 1, label: 'Bathymetry/Digital Elevation Model' },
          { id: 2, label: 'Ferrous object detections/magnetic anomalies' },
          { id: 3, label: 'Ground-truth data' },
          { id: 4, label: 'Lakebed color' },
          { id: 5, label: 'Lakebed surface type, hardness/smoothness/slope' },
          { id: 6, label: 'Sub-bottom geology' }
      ];
      var store = new Memory({
        data: data
      });
      var os = new ObjectStore({ objectStore: store });
      var s = new Select({
        store: os,
        sortByLabel: false
      }, "target");
      s.startup();
      data.unshift({ id: -1, label: 'None' })
      //store.setData(data);
      var s1 = new Select({
        store: os,
        sortByLabel: false
      }, "target1");
      s1.startup();
      s1.on("change", function () {
        console.log("my value: ", this.get("value"))
      });
    })
  </script>
</head>
<body class="claro">
  <div>
    <div id="target"></div>
  </div>
  <div id="target1"></div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
kenbujapro
0viewers