title: Javascript and XML button
body: <p>Hi I have made a button through html and I am trying to get an XML page to appear when the button is clicked. I need to do this through javascript however it doesnt seem to be working for me. </p>
  
  <p>My HTML:  </p>
  
  <pre><code>&lt;input type="button" value="Shop 1" id ="one"&gt;
  &lt;input type="button" value="Shop 2" id ="two"&gt;
  &lt;input type="button" value="Put Selected Pictures in Cart" id ="three"&gt;
  </code></pre>
  
  <p>My JavaScript:</p>
  
  <pre><code> function getData(filename) { env = new XMLHttpRequest(); env.open("GET",            filename); } 
  
   function init()
  {
  
   document.getElementById('one').onclick = function(){ getData('shop1.xml'); }
   document.getElementById('two').onclick = function(){ getData('shop2.xml'); }
  }
  </code></pre>
  
  <p>Any help would be appreciated. Thanks. </p>