title: Adding drop down menu using d3.js
body: <p>I am trying to add a drop down menu to my d3 visualization. The problem is that the eventlistener does not get invoked on selecting any of the options. Also, how can I access the value of the option selected? Following is a snippet of my code..</p>
  
  <pre><code>d3.text("uniqueTeams.php",function(json){
      var dd=JSON.parse(json);
      var b= d3.select("#s4").select("#shru");
      var u=b.append("select");
      var t=u.selectAll("option").data(dd).enter().append("option")
          .attr("value",function(d){return d.teamShotID;})
          .text(function(d){return d3.select(this).node().__data__.teamShotID;});
      t.on("change",change);
  });
  function change(value)
  {
      console.log("team",value);
  }
  change();​​​​
  </code></pre>
  
  <p>Thankx</p>